From 1fcc618532fb8cf833e0c400f263af3cc91a0892 Mon Sep 17 00:00:00 2001 From: Programmix Date: Sat, 1 Oct 2016 13:22:32 -0700 Subject: [PATCH 01/62] Fix removeListener call (#762) --- src/structures/MessageCollector.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/MessageCollector.js b/src/structures/MessageCollector.js index b7395dbb0..2b847922e 100644 --- a/src/structures/MessageCollector.js +++ b/src/structures/MessageCollector.js @@ -101,8 +101,8 @@ class MessageCollector extends EventEmitter { get next() { return new Promise((resolve, reject) => { const cleanup = () => { - this.removeListener(onMessage); - this.removeListener(onEnd); + this.removeListener('message', onMessage); + this.removeListener('end', onEnd); }; const onMessage = (...args) => { From d35372d3e979ce88b292d5bbada48183ca17839d Mon Sep 17 00:00:00 2001 From: Programmix Date: Sat, 1 Oct 2016 21:23:35 -0700 Subject: [PATCH 02/62] Fix MessageCollector.next edge case (#765) --- src/structures/MessageCollector.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/structures/MessageCollector.js b/src/structures/MessageCollector.js index 2b847922e..48234d4a4 100644 --- a/src/structures/MessageCollector.js +++ b/src/structures/MessageCollector.js @@ -100,6 +100,11 @@ class MessageCollector extends EventEmitter { */ get next() { return new Promise((resolve, reject) => { + if (this.ended) { + reject(this.collected); + return; + } + const cleanup = () => { this.removeListener('message', onMessage); this.removeListener('end', onEnd); From 51f30d6e4cbe2c4a5d40c3aae471150d92d7ea0a Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 2 Oct 2016 01:51:10 -0400 Subject: [PATCH 03/62] Add nickname mention format to GuildMember.toString --- src/structures/GuildMember.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 46bfd6d0f..c296aaab4 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -407,7 +407,7 @@ class GuildMember { * console.log(`Hello from ${member}!`); */ toString() { - return String(this.user); + return `<@${this.nickname ? '!' : ''}${this.user.id}>`; } // These are here only for documentation purposes - they are implemented by TextBasedChannel From 77e37b62ef24928619bbdfb1b8460d32344d08ac Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 2 Oct 2016 11:14:32 -0400 Subject: [PATCH 04/62] Fix sendMessage with no content and split/disableEveryone --- src/client/rest/RESTMethods.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index db9dee3ed..4d0cc6271 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -51,11 +51,13 @@ class RESTMethods { return new Promise((resolve, reject) => { if (typeof content !== 'undefined') content = this.rest.client.resolver.resolveString(content); - if (disableEveryone || (typeof disableEveryone === 'undefined' && this.rest.client.options.disableEveryone)) { - content = content.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere'); - } + if (content) { + if (disableEveryone || (typeof disableEveryone === 'undefined' && this.rest.client.options.disableEveryone)) { + content = content.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere'); + } - if (split) content = splitMessage(content, typeof split === 'object' ? split : {}); + if (split) content = splitMessage(content, typeof split === 'object' ? split : {}); + } if (channel instanceof User || channel instanceof GuildMember) { this.createDM(channel).then(chan => { From c4e1e4f50f9ff60f336f703dbf9c094d97fed61a Mon Sep 17 00:00:00 2001 From: Programmix Date: Sun, 2 Oct 2016 16:21:08 -0700 Subject: [PATCH 05/62] Add InviteResolvable (#766) * Add InviteResolvable Add InviteResolvable * Return data as fallback instead * Rename resolver method --- src/client/Client.js | 5 +++-- src/client/ClientDataResolver.js | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index 494dd5cbc..bbc09aada 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -265,10 +265,11 @@ class Client extends EventEmitter { /** * Fetches an invite object from an invite code. - * @param {string} code the invite code. + * @param {InviteResolvable} invite An invite code or URL * @returns {Promise} */ - fetchInvite(code) { + fetchInvite(invite) { + const code = this.resolver.resolveInviteCode(invite); return this.rest.methods.getInvite(code); } diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index 70efc8470..f8f027e0d 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -205,6 +205,26 @@ class ClientDataResolver { return String(data); } + /** + * Data that can be resolved to give an invite code. This can be: + * * An invite code + * * An invite URL + * @typedef {string} InviteResolvable + */ + + /** + * Resolves InviteResolvable to an invite code + * @param {InviteResolvable} data The invite resolvable to resolve + * @returns {string} + */ + resolveInviteCode(data) { + const inviteRegex = /discord(?:app)?\.(?:gg|com\/invite)\/([a-z0-9]{5})/i; + const match = inviteRegex.exec(data); + + if (match && match[1]) return match[1]; + return data; + } + /** * Data that can be resolved to give a Buffer. This can be: * * A Buffer From e24c9c271e3f7ba5af986d2f74f692bd13d0ab81 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 3 Oct 2016 20:25:39 -0400 Subject: [PATCH 06/62] Quite possibly fix annoying bug Evie was complaining about --- src/structures/ClientUser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 4e4d18cc7..3900945a9 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -130,7 +130,7 @@ class ClientUser extends User { let game = this.localPresence.game; let afk = this.localPresence.afk || this.presence.afk; - if (!game) { + if (!game && this.presence.game) { game = { name: this.presence.game.name, type: this.presence.game.type, From 8d777db1d1965fa1de3d210b8aa5c539be5ad8c9 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 3 Oct 2016 20:27:41 -0400 Subject: [PATCH 07/62] Clean up status type error --- src/structures/ClientUser.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 3900945a9..24b36bb42 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -125,7 +125,7 @@ class ClientUser extends User { */ setPresence(data) { // {"op":3,"d":{"status":"dnd","since":0,"game":null,"afk":false}} - return new Promise((resolve, reject) => { + return new Promise(resolve => { let status = this.localPresence.status || this.presence.status; let game = this.localPresence.game; let afk = this.localPresence.afk || this.presence.afk; @@ -139,10 +139,7 @@ class ClientUser extends User { } if (data.status) { - if (typeof data.status !== 'string') { - reject(new TypeError('status must be a string')); - return; - } + if (typeof data.status !== 'string') throw new TypeError('Status must be a string'); status = data.status; } From 53f5c2cb5282a857dd1a8e78038d6d5d65b078b0 Mon Sep 17 00:00:00 2001 From: Slamakans Date: Wed, 5 Oct 2016 00:53:26 +0200 Subject: [PATCH 08/62] Cache array and keyArray in Collection (#771) * Cache array and keyArray in Collection Cache array and keyArray in the Collection class to improve consecutive calls of collection.random() by around 400,000%, I think lel. The speed decrease (I assume) compared to the previous version when calling after it has changed is most likely negligible. * Fix for ESLint I think this fixes it. --- src/util/Collection.js | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/util/Collection.js b/src/util/Collection.js index 70b29b9c2..e40d93396 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -3,6 +3,16 @@ * @extends {Map} */ class Collection extends Map { + set(key, value) { + super.set(key, value); + this.changed = true; + } + + delete(key) { + super.delete(key); + this.changed = true; + } + /** * Returns an ordered array of the values of this collection. * @returns {Array} @@ -67,8 +77,11 @@ class Collection extends Map { * @returns {*} */ random() { - const arr = this.array(); - return arr[Math.floor(Math.random() * arr.length)]; + if (!this.cachedArray || this.cachedArray.length !== this.size || this.changed) { + this.cachedArray = this.array(); + this.changed = false; + } + return this.cachedArray[Math.floor(Math.random() * this.cachedArray.length)]; } /** @@ -77,8 +90,11 @@ class Collection extends Map { * @returns {*} */ randomKey() { - const arr = this.keyArray(); - return arr[Math.floor(Math.random() * arr.length)]; + if (!this.cachedKeyArray || this.cachedKeyArray.length !== this.size || this.changed) { + this.cachedKeyArray = this.keyArray(); + this.changed = false; + } + return this.cachedKeyArray[Math.floor(Math.random() * this.cachedKeyArray.length)]; } /** From 93425c3979bf85b3ccb7f6d3fe9b1fbb4ce2ddb1 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 4 Oct 2016 19:10:29 -0400 Subject: [PATCH 09/62] Expand collection array caching --- docs/docs.json | 2 +- src/util/Collection.js | 42 ++++++++++++++++++++++++------------------ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index b49d3a033..303f91104 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475349697813},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":283,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":351,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":357,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":99,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Returns an ordered array of the values of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":13,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Returns an ordered array of the keys of this collection.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":24,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":49,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":59,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":69,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":79,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":92,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":145,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":172,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":184,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":200,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":215,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":230,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":245,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":257,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":271,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475622584612},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":284,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":352,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":358,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/util/Collection.js b/src/util/Collection.js index 8425ae272..b70cec32f 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -3,36 +3,48 @@ * @extends {Map} */ class Collection extends Map { - set(key, value) { - super.set(key, value); - this.changed = true; + constructor(iterable) { + super(iterable); + this._array = null; + this._keyArray = null; + } + + set(key, val) { + super.set(key, val); + this._array = null; + this._keyArray = null; } delete(key) { super.delete(key); - this.changed = true; + this._array = null; + this._keyArray = null; } /** - * Returns an ordered array of the values of this collection. + * Creates an ordered array of the values of this collection, and caches it internally. The array will only be + * reconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array. * @returns {Array} * @example * // identical to: * Array.from(collection.values()); */ array() { - return Array.from(this.values()); + if (!this._array || this._array.length !== this.size) this._array = Array.from(this.values()); + return this._array; } /** - * Returns an ordered array of the keys of this collection. + * Creates an ordered array of the keys of this collection, and caches it internally. The array will only be + * reconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array. * @returns {Array} * @example * // identical to: * Array.from(collection.keys()); */ keyArray() { - return Array.from(this.keys()); + if (!this._keyArray || this._keyArray.length !== this.size) this._keyArray = Array.from(this.keys()); + return this._keyArray; } /** @@ -77,11 +89,8 @@ class Collection extends Map { * @returns {*} */ random() { - if (!this.cachedArray || this.cachedArray.length !== this.size || this.changed) { - this.cachedArray = this.array(); - this.changed = false; - } - return this.cachedArray[Math.floor(Math.random() * this.cachedArray.length)]; + const arr = this.array(); + return arr[Math.floor(Math.random() * arr.length)]; } /** @@ -90,11 +99,8 @@ class Collection extends Map { * @returns {*} */ randomKey() { - if (!this.cachedKeyArray || this.cachedKeyArray.length !== this.size || this.changed) { - this.cachedKeyArray = this.keyArray(); - this.changed = false; - } - return this.cachedKeyArray[Math.floor(Math.random() * this.cachedKeyArray.length)]; + const arr = this.keyArray(); + return arr[Math.floor(Math.random() * arr.length)]; } /** From 79b0d3f2a55f7950f237d2306a6c4d531601875c Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 6 Oct 2016 21:48:25 -0400 Subject: [PATCH 10/62] Client.readyTime -> readyAt (consistency) --- docs/docs.json | 2 +- src/client/Client.js | 12 ++++++++++-- src/client/websocket/packets/handlers/Ready.js | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 303f91104..01008d86f 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475622584612},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":217,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":246,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":261,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":284,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":352,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":358,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475804882715},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":225,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":234,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":254,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":279,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":292,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":202,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":360,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":366,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index bbc09aada..5f397c81d 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -145,7 +145,7 @@ class Client extends EventEmitter { * The date at which the Client was regarded as being in the `READY` state. * @type {?Date} */ - this.readyTime = null; + this.readyAt = null; this._timeouts = new Set(); this._intervals = new Set(); @@ -170,7 +170,7 @@ class Client extends EventEmitter { * @readonly */ get uptime() { - return this.readyTime ? Date.now() - this.readyTime : null; + return this.readyAt ? Date.now() - this.readyAt : null; } /** @@ -195,6 +195,14 @@ class Client extends EventEmitter { return emojis; } + /** + * The timestamp that the client was last ready at + * @type {?number} + */ + get readyTimestamp() { + return this.readyAt ? this.readyAt.getTime() : null; + } + /** * Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's * much better to use a bot account rather than a user account. diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index 7236148d3..b6f3e1e1d 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -10,7 +10,7 @@ class ReadyHandler extends AbstractHandler { const clientUser = new ClientUser(client, data.user); client.user = clientUser; - client.readyTime = new Date(); + client.readyAt = new Date(); client.users.set(clientUser.id, clientUser); for (const guild of data.guilds) client.dataManager.newGuild(guild); From f9b7f9c27e0957929297bbdff71b465252b8cf9e Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 6 Oct 2016 21:49:08 -0400 Subject: [PATCH 11/62] Add readonly --- docs/docs.json | 2 +- src/client/Client.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 01008d86f..a1cd84cc2 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475804882715},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":225,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":234,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":254,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":269,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":279,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":292,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":202,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":360,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":366,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475804943657},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":293,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":203,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":361,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":367,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 5f397c81d..ce72ae6bb 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -198,6 +198,7 @@ class Client extends EventEmitter { /** * The timestamp that the client was last ready at * @type {?number} + * @readonly */ get readyTimestamp() { return this.readyAt ? this.readyAt.getTime() : null; From 1c4ed4547f31d762fb354d7d936a550a0735d88b Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Fri, 7 Oct 2016 13:09:41 -0500 Subject: [PATCH 12/62] adds new WebhookClient and allows you to fetch channel webhooks and such without being "over the top" (#768) * start blocking out client * proto webhookclient * wee working webhooks * it's all working * run docs * fix jsdoc issues * add example for webhookClient * add example in the examples place * fix docs --- docs/custom/examples/webhook.js | 12 ++ docs/custom/webhook.js | 10 + docs/docs.json | 2 +- src/client/WebhookClient.js | 46 +++++ src/client/rest/RESTMethods.js | 82 +++++++++ src/index.js | 2 + src/structures/Guild.js | 8 + src/structures/TextChannel.js | 3 + src/structures/Webhook.js | 184 +++++++++++++++++++ src/structures/interface/TextBasedChannel.js | 46 +++++ src/util/Constants.js | 6 +- 11 files changed, 399 insertions(+), 2 deletions(-) create mode 100644 docs/custom/examples/webhook.js create mode 100644 docs/custom/webhook.js create mode 100644 src/client/WebhookClient.js create mode 100644 src/structures/Webhook.js diff --git a/docs/custom/examples/webhook.js b/docs/custom/examples/webhook.js new file mode 100644 index 000000000..13cf7c883 --- /dev/null +++ b/docs/custom/examples/webhook.js @@ -0,0 +1,12 @@ +/* + Send a message using a webhook +*/ + +// import the discord.js module +const Discord = require('discord.js'); + +// create a new webhook +const hook = new Discord.WebhookClient('webhook id', 'webhook token'); + +// send a message using the webhook +hook.sendMessage('I am now alive!'); diff --git a/docs/custom/webhook.js b/docs/custom/webhook.js new file mode 100644 index 000000000..10f57f361 --- /dev/null +++ b/docs/custom/webhook.js @@ -0,0 +1,10 @@ +const fs = require('fs'); + +module.exports = { + category: 'Examples', + name: 'Webhooks', + data: +`\`\`\`js +${fs.readFileSync('./docs/custom/examples/webhook.js').toString('utf-8')} +\`\`\``, +}; diff --git a/docs/docs.json b/docs/docs.json index a1cd84cc2..787ac05b1 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475804943657},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":293,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":203,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":361,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":367,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":691,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":714,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":739,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":632,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":669,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":25,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1475863241345},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":293,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":203,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":361,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":367,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/WebhookClient.js b/src/client/WebhookClient.js new file mode 100644 index 000000000..6b2cbb12a --- /dev/null +++ b/src/client/WebhookClient.js @@ -0,0 +1,46 @@ +const Webhook = require('../structures/Webhook'); +const RESTManager = require('./rest/RESTManager'); +const ClientDataResolver = require('./ClientDataResolver'); +const mergeDefault = require('../util/MergeDefault'); +const Constants = require('../util/Constants'); + +/** + * The Webhook Client + * @extends {Webhook} + */ +class WebhookClient extends Webhook { + /** + * @param {string} id The id of the webhook. + * @param {string} token the token of the webhook. + * @param {ClientOptions} [options] Options for the client + * @example + * // create a new webhook and send a message + * let hook = new Discord.WebhookClient('1234', 'abcdef') + * hook.sendMessage('This will send a message').catch(console.log) + */ + constructor(id, token, options) { + super(null, id, token); + + /** + * The options the client was instantiated with + * @type {ClientOptions} + */ + this.options = mergeDefault(Constants.DefaultOptions, options); + + /** + * The REST manager of the client + * @type {RESTManager} + * @private + */ + this.rest = new RESTManager(this); + + /** + * The Data Resolver of the Client + * @type {ClientDataResolver} + * @private + */ + this.resolver = new ClientDataResolver(this); + } +} + +module.exports = WebhookClient; diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 4d0cc6271..52de7080c 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -7,6 +7,7 @@ const User = requireStructure('User'); const GuildMember = requireStructure('GuildMember'); const Role = requireStructure('Role'); const Invite = requireStructure('Invite'); +const Webhook = requireStructure('Webhook'); class RESTMethods { constructor(restManager) { @@ -537,6 +538,87 @@ class RESTMethods { }).catch(reject); }); } + + fetchGuildWebhooks(guild) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.guildWebhooks(guild.id), true) + .then(data => { + const hooks = new Collection(); + for (const hook of data) { + hooks.set(hook.id, new Webhook(this.rest.client, hook)); + } + resolve(hooks); + }).catch(reject); + }); + } + + fetchChannelWebhooks(channel) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.channelWebhooks(channel.id), true) + .then(data => { + const hooks = new Collection(); + for (const hook of data) { + hooks.set(hook.id, new Webhook(this.rest.client, hook)); + } + resolve(hooks); + }).catch(reject); + }); + } + + fetchWebhook(id, token) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.webhook(id, token), require('util').isUndefined(token)) + .then(data => { + resolve(new Webhook(this.rest.client, data)); + }).catch(reject); + }); + } + + createChannelWebhook(channel, name, avatar) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('post', Constants.Endpoints.channelWebhooks(channel.id), true, { + name: name, avatar: avatar, + }) + .then(data => { + resolve(new Webhook(this.rest.client, data)); + }).catch(reject); + }); + } + + deleteChannelWebhook(webhook) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('delete', Constants.Endpoints.webhook(webhook.id, webhook.token), false) + .then(resolve).catch(reject); + }); + } + + editChannelWebhook(webhook, name, avatar) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('patch', Constants.Endpoints.webhook(webhook.id, webhook.token), false, { + name: name, avatar: avatar, + }) + .then(data => { + resolve(data); + }).catch(reject); + }); + } + + sendWebhookMessage(webhook, content, { avatarURL, tts, disableEveryone, embeds } = {}, file = null) { + return new Promise((resolve, reject) => { + if (typeof content !== 'undefined') content = this.rest.client.resolver.resolveString(content); + + if (disableEveryone || (typeof disableEveryone === 'undefined' && this.rest.client.options.disableEveryone)) { + content = content.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere'); + } + + this.rest.makeRequest('post', `${Constants.Endpoints.webhook(webhook.id, webhook.token)}?wait=true`, false, { + content: content, username: webhook.name, avatar_url: avatarURL, tts: tts, file: file, embeds: embeds, + }) + .then(data => { + resolve(data); + }).catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/index.js b/src/index.js index 1d23a027c..b39ad9f45 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,6 @@ module.exports = { Client: require('./client/Client'), + WebhookClient: require('./client/WebhookClient'), Shard: require('./sharding/Shard'), ShardClientUtil: require('./sharding/ShardClientUtil'), ShardingManager: require('./sharding/ShardingManager'), @@ -28,6 +29,7 @@ module.exports = { TextChannel: require('./structures/TextChannel'), User: require('./structures/User'), VoiceChannel: require('./structures/VoiceChannel'), + Webhook: require('./structures/Webhook'), version: require('../package').version, }; diff --git a/src/structures/Guild.js b/src/structures/Guild.js index d08db67d5..89e9cface 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -622,6 +622,14 @@ class Guild { return this.client.rest.methods.deleteGuild(this); } + /** + * Fetch all webhooks for the guild. + * @returns {Collection} + */ + fetchWebhooks() { + return this.client.rest.methods.fetchGuildWebhooks(this); + } + /** * Whether this Guild equals another Guild. It compares all properties, so for most operations * it is advisable to just compare `guild.id === guild2.id` as it is much faster and is often diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index d14b2e28a..d6440cea3 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -57,6 +57,9 @@ class TextChannel extends GuildChannel { createCollector() { return; } awaitMessages() { return; } bulkDelete() { return; } + fetchWebhook() { return; } + fetchWebhooks() { return; } + createWebhook() { return; } _cacheMessage() { return; } } diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js new file mode 100644 index 000000000..1431c863e --- /dev/null +++ b/src/structures/Webhook.js @@ -0,0 +1,184 @@ +const path = require('path'); + +/** + * Represents a Webhook + */ +class Webhook { + constructor(client, dataOrID, token) { + if (client) { + /** + * The client that instantiated the Channel + * @type {Client} + */ + this.client = client; + Object.defineProperty(this, 'client', { enumerable: false, configurable: false }); + if (dataOrID) this.setup(dataOrID); + } else { + this.id = dataOrID; + this.token = token; + this.client = this; + } + } + + setup(data) { + /** + * The name of the Webhook + * @type {string} + */ + this.name = data.name; + + /** + * The token for the Webhook + * @type {string} + */ + this.token = data.token; + + /** + * The avatar for the Webhook + * @type {string} + */ + this.avatar = data.avatar; + + /** + * The ID of the Webhook + * @type {string} + */ + this.id = data.id; + + /** + * The guild the Webhook belongs to + * @type {string} + */ + this.guild_id = data.guild_id; + + /** + * The channel the Webhook belongs to + * @type {string} + */ + this.channel_id = data.channel_id; + + /** + * The owner of the Webhook + * @type {User} + */ + if (data.user) this.owner = data.user; + } + + /** + * Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode + * @typedef {Object} MessageOptions + * @property {boolean} [tts=false] Whether or not the message should be spoken aloud + * @property {boolean} [disableEveryone=this.options.disableEveryone] Whether or not @everyone and @here + * should be replaced with plain-text + */ + + /** + * Send a message with this webhook + * @param {StringResolvable} content The content to send + * @param {MessageOptions} [options={}] The options to provide + * @returns {Promise} + * @example + * // send a message + * webook.sendMessage('hello!') + * .then(message => console.log(`Sent message: ${message.content}`)) + * .catch(console.error); + */ + sendMessage(content, options = {}) { + return this.client.rest.methods.sendWebhookMessage(this, content, options); + } + + /** + * Send a text-to-speech message with this webhook + * @param {StringResolvable} content The content to send + * @param {MessageOptions} [options={}] The options to provide + * @returns {Promise} + * @example + * // send a TTS message + * webhook.sendTTSMessage('hello!') + * .then(message => console.log(`Sent tts message: ${message.content}`)) + * .catch(console.error); + */ + sendTTSMessage(content, options = {}) { + Object.assign(options, { tts: true }); + return this.client.rest.methods.sendWebhookMessage(this, content, options); + } + + /** + * Send a file with this webhook + * @param {FileResolvable} attachment The file to send + * @param {string} [fileName="file.jpg"] The name and extension of the file + * @param {StringResolvable} [content] Text message to send with the attachment + * @param {MessageOptions} [options] The options to provide + * @returns {Promise} + */ + sendFile(attachment, fileName, content, options = {}) { + if (!fileName) { + if (typeof attachment === 'string') { + fileName = path.basename(attachment); + } else if (attachment && attachment.path) { + fileName = path.basename(attachment.path); + } else { + fileName = 'file.jpg'; + } + } + return new Promise((resolve, reject) => { + this.client.resolver.resolveFile(attachment).then(file => { + this.client.rest.methods.sendWebhookMessage(this, content, options, { + file, + name: fileName, + }).then(resolve).catch(reject); + }).catch(reject); + }); + } + + /** + * Send a code block with this webhook + * @param {string} lang Language for the code block + * @param {StringResolvable} content Content of the code block + * @param {MessageOptions} options The options to provide + * @returns {Promise} + */ + sendCode(lang, content, options = {}) { + if (options.split) { + if (typeof options.split !== 'object') options.split = {}; + if (!options.split.prepend) options.split.prepend = `\`\`\`${lang ? lang : ''}\n`; + if (!options.split.append) options.split.append = '\n```'; + } + content = this.client.resolver.resolveString(content).replace(/```/g, '`\u200b``'); + return this.sendMessage(`\`\`\`${lang ? lang : ''}\n${content}\n\`\`\``, options); + } + + /** + * Delete the Webhook + * @returns {Promise} + */ + delete() { + return this.client.rest.methods.deleteChannelWebhook(this); + } + + /** + * Edit the Webhook. + * @param {string} name The new name for the Webhook + * @param {FileResolvable} avatar The new avatar for the Webhook. + * @returns {Promise} + */ + edit(name, avatar) { + return new Promise((resolve, reject) => { + if (avatar) { + this.client.resolver.resolveFile(avatar).then(file => { + let base64 = new Buffer(file, 'binary').toString('base64'); + let dataURI = `data:;base64,${base64}`; + this.client.rest.methods.editChannelWebhook(this, name, dataURI) + .then(resolve).catch(reject); + }).catch(reject); + } else { + this.client.rest.methods.editChannelWebhook(this, name) + .then(data => { + this.setup(data); + }).catch(reject); + } + }); + } +} + +module.exports = Webhook; diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 88b1cea5b..19e52707d 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -329,6 +329,49 @@ class TextBasedChannel { this.messages.set(message.id, message); return message; } + + /** + * Fetch all webhooks for the channel. + * @returns {Collection} + */ + fetchWebhooks() { + return this.client.rest.methods.fetchChannelWebhooks(this); + } + + /** + * Fetch a webhook by ID + * @param {string} id The id of the webhook. + * @returns {Promise} + */ + fetchWebhook(id) { + return this.client.rest.methods.fetchWebhook(id); + } + + /** + * Create a webhook for the channel. + * @param {string} name The name of the webhook. + * @param {FileResolvable=} avatar The avatar for the webhook. + * @returns {Webhook} webhook The created webhook. + * @example + * channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png') + * .then(webhook => console.log(`Created Webhook ${webhook}`)) + * .catch(console.log) + */ + createWebhook(name, avatar) { + return new Promise((resolve, reject) => { + if (avatar) { + this.client.resolver.resolveFile(avatar).then(file => { + let base64 = new Buffer(file, 'binary').toString('base64'); + let dataURI = `data:;base64,${base64}`; + this.client.rest.methods.createChannelWebhook(this, name, dataURI) + .then(resolve).catch(reject); + }).catch(reject); + } else { + this.client.rest.methods.createChannelWebhook(this, name) + .then(resolve).catch(reject); + } + }); + } } exports.applyToClass = (structure, full = false) => { @@ -345,6 +388,9 @@ exports.applyToClass = (structure, full = false) => { props.push('fetchPinnedMessages'); props.push('createCollector'); props.push('awaitMessages'); + props.push('fetchWebhooks'); + props.push('fetchWebhook'); + props.push('createWebhook'); } for (const prop of props) applyProp(structure, prop); }; diff --git a/src/util/Constants.js b/src/util/Constants.js index 9cf3771c9..6db424e39 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -103,6 +103,10 @@ const Endpoints = exports.Endpoints = { channelTyping: (channelID) => `${Endpoints.channel(channelID)}/typing`, channelPermissions: (channelID) => `${Endpoints.channel(channelID)}/permissions`, channelMessage: (channelID, messageID) => `${Endpoints.channelMessages(channelID)}/${messageID}`, + channelWebhooks: (channelID) => `${Endpoints.channel(channelID)}/webhooks`, + + // webhooks + webhook: (webhookID, token) => `${API}/webhooks/${webhookID}${token ? `/${token}` : ''}`, }; exports.Status = { @@ -242,7 +246,7 @@ const PermissionFlags = exports.PermissionFlags = { CHANGE_NICKNAME: 1 << 26, MANAGE_NICKNAMES: 1 << 27, MANAGE_ROLES_OR_PERMISSIONS: 1 << 28, - + MANAGE_WEBHOOKS: 1 << 29, MANAGE_EMOJIS: 1 << 30, }; From da5183a5d5a8bf2bba6478c145d184589be1403f Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 8 Oct 2016 00:11:57 -0400 Subject: [PATCH 13/62] Expose splitMessage --- src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.js b/src/index.js index b39ad9f45..090c24e84 100644 --- a/src/index.js +++ b/src/index.js @@ -4,7 +4,9 @@ module.exports = { Shard: require('./sharding/Shard'), ShardClientUtil: require('./sharding/ShardClientUtil'), ShardingManager: require('./sharding/ShardingManager'), + Collection: require('./util/Collection'), + splitMessage: require('./util/SplitMessage'), Channel: require('./structures/Channel'), ClientUser: require('./structures/ClientUser'), From 4653f885557a174fd2c60d7e30831509394baab7 Mon Sep 17 00:00:00 2001 From: Programmix Date: Sun, 9 Oct 2016 10:27:31 -0700 Subject: [PATCH 14/62] Add disabledEvents option to Client (#784) --- src/client/websocket/packets/WebSocketPacketManager.js | 2 ++ src/util/Constants.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 25e17861b..3295ef646 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -84,6 +84,8 @@ class WebSocketPacketManager { this.setSequence(packet.s); + if (this.ws.client.options.disabledEvents.includes(packet.t)) return false; + if (this.ws.status !== Constants.Status.READY) { if (BeforeReadyWhitelist.indexOf(packet.t) === -1) { this.queue.push(packet); diff --git a/src/util/Constants.js b/src/util/Constants.js index 6db424e39..0ac069a5c 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -17,6 +17,9 @@ exports.Package = require('../../package.json'); * @property {boolean} [disableEveryone=false] Default value for MessageOptions.disableEveryone * @property {number} [restWsBridgeTimeout=5000] Maximum time permitted between REST responses and their * corresponding websocket events + * @property {string[]} [disabledEvents] An array of disabled websocket events. Events in this array will not be + * processed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on + * large-scale bots. * @property {WebsocketOptions} [ws] Options for the websocket */ exports.DefaultOptions = { @@ -29,6 +32,7 @@ exports.DefaultOptions = { fetchAllMembers: false, disableEveryone: false, restWsBridgeTimeout: 5000, + disabledEvents: [], /** * Websocket options. These are left as snake_case to match the API. From 3e2d6ccc48889f4c417c122c9a5cf78cf245c72a Mon Sep 17 00:00:00 2001 From: Programmix Date: Sun, 9 Oct 2016 11:22:52 -0700 Subject: [PATCH 15/62] Convert disabledEvents Array to Object (#786) * Convert disabledEvents Array to Object Increased performance * Commit to please Lord Gawdl3y * Nitpick with chopsticks --- src/client/Client.js | 11 +++++++++++ .../websocket/packets/WebSocketPacketManager.js | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/client/Client.js b/src/client/Client.js index ce72ae6bb..c1b4e78f1 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -37,6 +37,17 @@ class Client extends EventEmitter { this.options.shardCount = Number(process.env.SHARD_COUNT); } + if (!(this.options.disabledEvents instanceof Array)) { + throw new TypeError('The disabledEvents client option must be an array.'); + } + + let disabledEvents = {}; + for (const event in this.options.disabledEvents) { + disabledEvents[event] = true; + } + + this.options.disabledEvents = disabledEvents; + /** * The REST manager of the client * @type {RESTManager} diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 3295ef646..5ef060f0e 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -84,7 +84,9 @@ class WebSocketPacketManager { this.setSequence(packet.s); - if (this.ws.client.options.disabledEvents.includes(packet.t)) return false; + if (this.ws.client.options.disabledEvents[packet.t] !== undefined) { + return false; + } if (this.ws.status !== Constants.Status.READY) { if (BeforeReadyWhitelist.indexOf(packet.t) === -1) { From 7b571f972926cdad5f6f286e836f23fa2d883818 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 14:32:48 -0400 Subject: [PATCH 16/62] Add escapeMarkdown util function --- src/index.js | 1 + src/structures/Message.js | 3 ++- src/structures/interface/TextBasedChannel.js | 3 ++- src/util/EscapeMarkdown.js | 4 ++++ 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 src/util/EscapeMarkdown.js diff --git a/src/index.js b/src/index.js index 090c24e84..24b5a26da 100644 --- a/src/index.js +++ b/src/index.js @@ -7,6 +7,7 @@ module.exports = { Collection: require('./util/Collection'), splitMessage: require('./util/SplitMessage'), + escapeMarkdown: require('./util/EscapeMarkdown'), Channel: require('./structures/Channel'), ClientUser: require('./structures/ClientUser'), diff --git a/src/structures/Message.js b/src/structures/Message.js index ffd04b19b..2ead7f0e8 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -2,6 +2,7 @@ const Attachment = require('./MessageAttachment'); const Embed = require('./MessageEmbed'); const Collection = require('../util/Collection'); const Constants = require('../util/Constants'); +const escapeMarkdown = require('../../util/EscapeMarkdown'); /** * Represents a Message on Discord @@ -332,7 +333,7 @@ class Message { * @returns {Promise} */ editCode(lang, content) { - content = this.client.resolver.resolveString(content).replace(/```/g, '`\u200b``'); + content = escapeMarkdown(this.client.resolver.resolveString(content), true); return this.edit(`\`\`\`${lang ? lang : ''}\n${content}\n\`\`\``); } diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 19e52707d..ceac04d75 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -2,6 +2,7 @@ const path = require('path'); const Message = require('../Message'); const MessageCollector = require('../MessageCollector'); const Collection = require('../../util/Collection'); +const escapeMarkdown = require('../../util/EscapeMarkdown'); /** * Interface for classes that have text-channel-like features @@ -114,7 +115,7 @@ class TextBasedChannel { if (!options.split.prepend) options.split.prepend = `\`\`\`${lang ? lang : ''}\n`; if (!options.split.append) options.split.append = '\n```'; } - content = this.client.resolver.resolveString(content).replace(/```/g, '`\u200b``'); + content = escapeMarkdown(this.client.resolver.resolveString(content), true); return this.sendMessage(`\`\`\`${lang ? lang : ''}\n${content}\n\`\`\``, options); } diff --git a/src/util/EscapeMarkdown.js b/src/util/EscapeMarkdown.js new file mode 100644 index 000000000..01e01206f --- /dev/null +++ b/src/util/EscapeMarkdown.js @@ -0,0 +1,4 @@ +module.exports = function escapeMarkdown(text, onlyCodeBlock = false) { + if (onlyCodeBlock) return text.replace(/```/g, '`\u200b``'); + return text.replace(/\\(\*|_|`|~|\\)/g, '$1').replace(/(\*|_|`|~|\\)/g, '\\$1'); +}; From dabe51fc8d06311c3f9d42131f0333d5ef83a598 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 14:41:57 -0400 Subject: [PATCH 17/62] Reorganise disabledEvents stuff --- src/client/Client.js | 7 ------- src/client/websocket/WebSocketManager.js | 11 ++++++++--- .../websocket/packets/WebSocketPacketManager.js | 4 +--- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index c1b4e78f1..f5327e447 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -41,13 +41,6 @@ class Client extends EventEmitter { throw new TypeError('The disabledEvents client option must be an array.'); } - let disabledEvents = {}; - for (const event in this.options.disabledEvents) { - disabledEvents[event] = true; - } - - this.options.disabledEvents = disabledEvents; - /** * The REST manager of the client * @type {RESTManager} diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index ffc6b2358..aee234cc5 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -59,6 +59,13 @@ class WebSocketManager extends EventEmitter { */ this.ws = null; + /** + * An object with keys that are websocket event names that should be ignored + * @type {Object} + */ + this.disabledEvents = {}; + for (const event in client.options.disabledEvents) this.disabledEvents[event] = true; + this.first = true; } @@ -69,9 +76,7 @@ class WebSocketManager extends EventEmitter { _connect(gateway) { this.client.emit('debug', `Connecting to gateway ${gateway}`); this.normalReady = false; - if (this.status !== Constants.Status.RECONNECTING) { - this.status = Constants.Status.CONNECTING; - } + if (this.status !== Constants.Status.RECONNECTING) this.status = Constants.Status.CONNECTING; this.ws = new WebSocket(gateway); this.ws.onopen = () => this.eventOpen(); this.ws.onclose = (d) => this.eventClose(d); diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 5ef060f0e..0c2b025cc 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -84,9 +84,7 @@ class WebSocketPacketManager { this.setSequence(packet.s); - if (this.ws.client.options.disabledEvents[packet.t] !== undefined) { - return false; - } + if (this.ws.disabledEvents[packet.t] !== undefined) return false; if (this.ws.status !== Constants.Status.READY) { if (BeforeReadyWhitelist.indexOf(packet.t) === -1) { From e3b2f1f3da36c244d7d9f4da3168f71b32f376fb Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 15:08:21 -0400 Subject: [PATCH 18/62] Fix require path --- src/structures/Message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 2ead7f0e8..31afb2b1d 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -2,7 +2,7 @@ const Attachment = require('./MessageAttachment'); const Embed = require('./MessageEmbed'); const Collection = require('../util/Collection'); const Constants = require('../util/Constants'); -const escapeMarkdown = require('../../util/EscapeMarkdown'); +const escapeMarkdown = require('../util/EscapeMarkdown'); /** * Represents a Message on Discord From a717b60417652754200c28dfb583a808139401ad Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 15:11:15 -0400 Subject: [PATCH 19/62] Add validation for all non-ws client options --- docs/docs.json | 2 +- src/client/Client.js | 52 ++++++++++++++++++++++++++++++++----------- src/util/Constants.js | 2 +- 3 files changed, 41 insertions(+), 15 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 787ac05b1..5447447de 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1475863241345},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":226,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":235,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":255,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":270,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":280,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":293,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":30,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":93,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":99,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":111,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":118,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":130,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":136,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":142,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":148,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":163,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":172,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":181,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":190,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":203,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":361,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":367,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":191,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":228,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":238,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":280,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":9,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":309,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":324,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":334,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":343,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":351,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":365,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":386,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":407,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":436,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":22,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":44,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":57,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":69,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":75,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":81,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":87,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":100,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":111,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":202,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":211,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":220,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":230,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":269,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":278,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":287,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":298,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":10,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":56,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":71,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":84,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":111,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":131,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":163,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":181,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":202,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":230,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":274,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":298,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":16,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":246,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":255,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":36,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":143,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":278,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe max message lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":33,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476040231249},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index f5327e447..80362ba15 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -23,23 +23,16 @@ class Client extends EventEmitter { constructor(options) { super(); + // Obtain shard details from environment + if (!options.shardId && 'SHARD_ID' in process.env) options.shardId = Number(process.env.SHARD_ID); + if (!options.shardCount && 'SHARD_COUNT' in process.env) options.shardCount = Number(process.env.SHARD_COUNT); + /** * The options the client was instantiated with * @type {ClientOptions} */ this.options = mergeDefault(Constants.DefaultOptions, options); - - if (!this.options.shardId && 'SHARD_ID' in process.env) { - this.options.shardId = Number(process.env.SHARD_ID); - } - - if (!this.options.shardCount && 'SHARD_COUNT' in process.env) { - this.options.shardCount = Number(process.env.SHARD_COUNT); - } - - if (!(this.options.disabledEvents instanceof Array)) { - throw new TypeError('The disabledEvents client option must be an array.'); - } + this._validateOptions(); /** * The REST manager of the client @@ -295,7 +288,7 @@ class Client extends EventEmitter { * or -1 if the message cache lifetime is unlimited */ sweepMessages(lifetime = this.options.messageCacheLifetime) { - if (typeof lifetime !== 'number' || isNaN(lifetime)) throw new TypeError('Lifetime must be a number.'); + if (typeof lifetime !== 'number' || isNaN(lifetime)) throw new TypeError('The lifetime must be a number.'); if (lifetime <= 0) { this.emit('debug', 'Didn\'t sweep messages - lifetime is unlimited'); return -1; @@ -358,6 +351,39 @@ class Client extends EventEmitter { _eval(script) { return eval(script); } + + _validateOptions(options = this.options) { + if (typeof options.shardCount !== 'number' || isNaN(options.shardCount)) { + throw new TypeError('The shardCount option must be a number.'); + } + if (typeof options.shardId !== 'number' || isNaN(options.shardId)) { + throw new TypeError('The shardId option must be a number.'); + } + if (options.shardCount < 0) throw new RangeError('The shardCount option must be at least 0.'); + if (options.shardId < 0) throw new RangeError('The shardId option must be at least 0.'); + if (options.shardId !== 0 && options.shardId >= options.shardCount) { + throw new RangeError('The shardId option must be less than shardCount.'); + } + if (typeof options.maxMessageCache !== 'number' || isNaN(options.maxMessageCache)) { + throw new TypeError('The maxMessageCache option must be a number.'); + } + if (typeof options.messageCacheLifetime !== 'number' || isNaN(options.messageCacheLifetime)) { + throw new TypeError('The messageCacheLifetime option must be a number.'); + } + if (typeof options.messageSweepInterval !== 'number' || isNaN(options.messageSweepInterval)) { + throw new TypeError('The messageSweepInterval option must be a number.'); + } + if (typeof options.fetchAllMembers !== 'boolean') { + throw new TypeError('The fetchAllMembers option must be a boolean.'); + } + if (typeof options.disableEveryone !== 'boolean') { + throw new TypeError('The disableEveryone option must be a boolean.'); + } + if (typeof options.restWsBridgeTimeout !== 'number' || isNaN(options.restWsBridgeTimeout)) { + throw new TypeError('The restWsBridgeTimeout option must be a number.'); + } + if (!(options.disabledEvents instanceof Array)) throw new TypeError('The disabledEvents option must be an Array.'); + } } module.exports = Client; diff --git a/src/util/Constants.js b/src/util/Constants.js index 0ac069a5c..b45a91474 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -11,7 +11,7 @@ exports.Package = require('../../package.json'); * @property {number} [messageCacheLifetime=0] How long until a message should be uncached by the message sweeping * (in seconds, 0 for forever) * @property {number} [messageSweepInterval=0] How frequently to remove messages from the cache that are older than - * the max message lifetime (in seconds, 0 for never) + * the message cache lifetime (in seconds, 0 for never) * @property {boolean} [fetchAllMembers=false] Whether to cache all guild members and users upon startup, as well as * upon joining a guild * @property {boolean} [disableEveryone=false] Default value for MessageOptions.disableEveryone From 7a53f70978ef56a787567d78574c63474c0730d3 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 15:16:54 -0400 Subject: [PATCH 20/62] Rename maxMessageCache -> messageCacheMaxSize --- docs/docs.json | 2 +- src/client/Client.js | 4 ++-- src/structures/interface/TextBasedChannel.js | 2 +- src/util/Constants.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 5447447de..6a4f80fca 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476040231249},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMessageCache","description":"Number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476040482243},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 80362ba15..ab2664064 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -364,8 +364,8 @@ class Client extends EventEmitter { if (options.shardId !== 0 && options.shardId >= options.shardCount) { throw new RangeError('The shardId option must be less than shardCount.'); } - if (typeof options.maxMessageCache !== 'number' || isNaN(options.maxMessageCache)) { - throw new TypeError('The maxMessageCache option must be a number.'); + if (typeof options.messageCacheMaxSize !== 'number' || isNaN(options.messageCacheMaxSize)) { + throw new TypeError('The messageCacheMaxSize option must be a number.'); } if (typeof options.messageCacheLifetime !== 'number' || isNaN(options.messageCacheLifetime)) { throw new TypeError('The messageCacheLifetime option must be a number.'); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index ceac04d75..8e2eba3ac 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -323,7 +323,7 @@ class TextBasedChannel { } _cacheMessage(message) { - const maxSize = this.client.options.maxMessageCache; + const maxSize = this.client.options.messageCacheMaxSize; if (maxSize === 0) return null; if (this.messages.size >= maxSize) this.messages.delete(this.messages.keys().next().value); diff --git a/src/util/Constants.js b/src/util/Constants.js index b45a91474..e4422002b 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -7,7 +7,7 @@ exports.Package = require('../../package.json'); * the order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order. * @property {number} [shardId=0] The ID of this shard * @property {number} [shardCount=0] The number of shards - * @property {number} [maxMessageCache=200] Number of messages to cache per channel + * @property {number} [messageCacheMaxSize=200] Maximum number of messages to cache per channel * @property {number} [messageCacheLifetime=0] How long until a message should be uncached by the message sweeping * (in seconds, 0 for forever) * @property {number} [messageSweepInterval=0] How frequently to remove messages from the cache that are older than @@ -26,7 +26,7 @@ exports.DefaultOptions = { apiRequestMethod: 'sequential', shardId: 0, shardCount: 0, - maxMessageCache: 200, + messageCacheMaxSize: 200, messageCacheLifetime: 0, messageSweepInterval: 0, fetchAllMembers: false, From bd7ff36b665ddaa5ede265d3adf6f2374bf9d039 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 15:22:14 -0400 Subject: [PATCH 21/62] Allow infinite messageCacheMaxSize --- docs/docs.json | 2 +- src/structures/interface/TextBasedChannel.js | 3 +-- src/util/Constants.js | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 6a4f80fca..12531fd9b 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476040482243},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":338,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":347,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476040904710},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 8e2eba3ac..23d3a4942 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -325,8 +325,7 @@ class TextBasedChannel { _cacheMessage(message) { const maxSize = this.client.options.messageCacheMaxSize; if (maxSize === 0) return null; - if (this.messages.size >= maxSize) this.messages.delete(this.messages.keys().next().value); - + if (this.messages.size >= maxSize && maxSize > 0) this.messages.delete(this.messages.firstKey()); this.messages.set(message.id, message); return message; } diff --git a/src/util/Constants.js b/src/util/Constants.js index e4422002b..f816d84b4 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -8,6 +8,7 @@ exports.Package = require('../../package.json'); * @property {number} [shardId=0] The ID of this shard * @property {number} [shardCount=0] The number of shards * @property {number} [messageCacheMaxSize=200] Maximum number of messages to cache per channel + * (-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely) * @property {number} [messageCacheLifetime=0] How long until a message should be uncached by the message sweeping * (in seconds, 0 for forever) * @property {number} [messageSweepInterval=0] How frequently to remove messages from the cache that are older than From e7745a0af5b4800e6aa38aa69c12417d7d62560e Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 15:30:46 -0400 Subject: [PATCH 22/62] Clean up some webhook stuff --- docs/docs.json | 2 +- src/structures/Guild.js | 16 +++--- src/structures/TextChannel.js | 2 +- src/structures/Webhook.js | 23 +++++---- src/structures/interface/TextBasedChannel.js | 54 ++++++++++---------- 5 files changed, 49 insertions(+), 48 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 12531fd9b..13ab6a6a6 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476040904710},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":304,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":318,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":352,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":380,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":394,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":408,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":422,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":436,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":450,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":464,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":480,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":494,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":514,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":537,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":556,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":578,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":594,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":608,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":621,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":6,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":86,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":101,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":114,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":141,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":155,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":165,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guild_id","name":"guild_id","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":52,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channel_id","name":"channel_id","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":58,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":337,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":346,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":67,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476041423830},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":325,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":339,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":325,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":339,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/Guild.js b/src/structures/Guild.js index 89e9cface..ad40214b1 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -296,6 +296,14 @@ class Guild { return this.client.rest.methods.getGuildInvites(this); } + /** + * Fetch all webhooks for the guild. + * @returns {Collection} + */ + fetchWebhooks() { + return this.client.rest.methods.fetchGuildWebhooks(this); + } + /** * Fetch a single guild member from a user. * @param {UserResolvable} user The user to fetch the member for @@ -622,14 +630,6 @@ class Guild { return this.client.rest.methods.deleteGuild(this); } - /** - * Fetch all webhooks for the guild. - * @returns {Collection} - */ - fetchWebhooks() { - return this.client.rest.methods.fetchGuildWebhooks(this); - } - /** * Whether this Guild equals another Guild. It compares all properties, so for most operations * it is advisable to just compare `guild.id === guild2.id` as it is much faster and is often diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index d6440cea3..cc1319541 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -56,10 +56,10 @@ class TextChannel extends GuildChannel { get typingCount() { return; } createCollector() { return; } awaitMessages() { return; } - bulkDelete() { return; } fetchWebhook() { return; } fetchWebhooks() { return; } createWebhook() { return; } + bulkDelete() { return; } _cacheMessage() { return; } } diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 1431c863e..d9e75d3af 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -1,4 +1,5 @@ const path = require('path'); +const escapeMarkdown = require('../util/EscapeMarkdown'); /** * Represents a Webhook @@ -49,13 +50,13 @@ class Webhook { * The guild the Webhook belongs to * @type {string} */ - this.guild_id = data.guild_id; + this.guildID = data.guild_id; /** * The channel the Webhook belongs to * @type {string} */ - this.channel_id = data.channel_id; + this.channelID = data.channel_id; /** * The owner of the Webhook @@ -144,18 +145,10 @@ class Webhook { if (!options.split.prepend) options.split.prepend = `\`\`\`${lang ? lang : ''}\n`; if (!options.split.append) options.split.append = '\n```'; } - content = this.client.resolver.resolveString(content).replace(/```/g, '`\u200b``'); + content = escapeMarkdown(this.client.resolver.resolveString(content), true); return this.sendMessage(`\`\`\`${lang ? lang : ''}\n${content}\n\`\`\``, options); } - /** - * Delete the Webhook - * @returns {Promise} - */ - delete() { - return this.client.rest.methods.deleteChannelWebhook(this); - } - /** * Edit the Webhook. * @param {string} name The new name for the Webhook @@ -179,6 +172,14 @@ class Webhook { } }); } + + /** + * Delete the Webhook + * @returns {Promise} + */ + delete() { + return this.client.rest.methods.deleteChannelWebhook(this); + } } module.exports = Webhook; diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 23d3a4942..2f25c6b0d 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -310,24 +310,12 @@ class TextBasedChannel { } /** - * Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after. - * Only OAuth Bot accounts may use this method. - * @param {Collection|Message[]} messages The messages to delete - * @returns {Collection} + * Fetch a webhook by ID + * @param {string} id The id of the webhook. + * @returns {Promise} */ - bulkDelete(messages) { - if (messages instanceof Collection) messages = messages.array(); - if (!(messages instanceof Array)) return Promise.reject(new TypeError('Messages must be an Array or Collection.')); - const messageIDs = messages.map(m => m.id); - return this.client.rest.methods.bulkDeleteMessages(this, messageIDs); - } - - _cacheMessage(message) { - const maxSize = this.client.options.messageCacheMaxSize; - if (maxSize === 0) return null; - if (this.messages.size >= maxSize && maxSize > 0) this.messages.delete(this.messages.firstKey()); - this.messages.set(message.id, message); - return message; + fetchWebhook(id) { + return this.client.rest.methods.fetchWebhook(id); } /** @@ -338,15 +326,6 @@ class TextBasedChannel { return this.client.rest.methods.fetchChannelWebhooks(this); } - /** - * Fetch a webhook by ID - * @param {string} id The id of the webhook. - * @returns {Promise} - */ - fetchWebhook(id) { - return this.client.rest.methods.fetchWebhook(id); - } - /** * Create a webhook for the channel. * @param {string} name The name of the webhook. @@ -372,6 +351,27 @@ class TextBasedChannel { } }); } + + /** + * Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after. + * Only OAuth Bot accounts may use this method. + * @param {Collection|Message[]} messages The messages to delete + * @returns {Collection} + */ + bulkDelete(messages) { + if (messages instanceof Collection) messages = messages.array(); + if (!(messages instanceof Array)) return Promise.reject(new TypeError('Messages must be an Array or Collection.')); + const messageIDs = messages.map(m => m.id); + return this.client.rest.methods.bulkDeleteMessages(this, messageIDs); + } + + _cacheMessage(message) { + const maxSize = this.client.options.messageCacheMaxSize; + if (maxSize === 0) return null; + if (this.messages.size >= maxSize && maxSize > 0) this.messages.delete(this.messages.firstKey()); + this.messages.set(message.id, message); + return message; + } } exports.applyToClass = (structure, full = false) => { @@ -388,8 +388,8 @@ exports.applyToClass = (structure, full = false) => { props.push('fetchPinnedMessages'); props.push('createCollector'); props.push('awaitMessages'); - props.push('fetchWebhooks'); props.push('fetchWebhook'); + props.push('fetchWebhooks'); props.push('createWebhook'); } for (const prop of props) applyProp(structure, prop); From 29b33bffaab577f019445614c95d6c13b7704a9d Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 9 Oct 2016 15:50:50 -0400 Subject: [PATCH 23/62] Rearrange and clean up more webhook stuff --- docs/docs.json | 2 +- src/client/Client.js | 9 ++++ src/client/rest/RESTMethods.js | 46 +++++++++----------- src/structures/Guild.js | 2 +- src/structures/TextChannel.js | 35 +++++++++++++-- src/structures/Webhook.js | 6 +-- src/structures/interface/TextBasedChannel.js | 46 -------------------- 7 files changed, 66 insertions(+), 80 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 13ab6a6a6..2dab3858e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476041423830},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":290,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":391,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":397,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchWebhook"]},{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":325,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[],"implements":["TextBasedChannel#fetchWebhooks"]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":339,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}],"implements":["TextBasedChannel#createWebhook"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID","memberof":"TextBasedChannel","meta":{"line":317,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextBasedChannel","meta":{"line":325,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"TextBasedChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextBasedChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":339,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Webhook",""]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","optional":true,"type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":361,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476042616008},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index ab2664064..0117b339c 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -279,6 +279,15 @@ class Client extends EventEmitter { return this.rest.methods.getInvite(code); } + /** + * Fetch a webhook by ID. + * @param {string} id ID of the webhook + * @returns {Promise} + */ + fetchWebhook(id) { + return this.rest.methods.getWebhook(id); + } + /** * Sweeps all channels' messages and removes the ones older than the max message lifetime. * If the message has been edited, the time of the edit is used rather than the time of the original message. diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 52de7080c..c456aa76d 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -539,7 +539,16 @@ class RESTMethods { }); } - fetchGuildWebhooks(guild) { + getWebhook(id, token) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('get', Constants.Endpoints.webhook(id, token), require('util').isUndefined(token)) + .then(data => { + resolve(new Webhook(this.rest.client, data)); + }).catch(reject); + }); + } + + getGuildWebhooks(guild) { return new Promise((resolve, reject) => { this.rest.makeRequest('get', Constants.Endpoints.guildWebhooks(guild.id), true) .then(data => { @@ -552,7 +561,7 @@ class RESTMethods { }); } - fetchChannelWebhooks(channel) { + getChannelWebhooks(channel) { return new Promise((resolve, reject) => { this.rest.makeRequest('get', Constants.Endpoints.channelWebhooks(channel.id), true) .then(data => { @@ -565,19 +574,11 @@ class RESTMethods { }); } - fetchWebhook(id, token) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('get', Constants.Endpoints.webhook(id, token), require('util').isUndefined(token)) - .then(data => { - resolve(new Webhook(this.rest.client, data)); - }).catch(reject); - }); - } - - createChannelWebhook(channel, name, avatar) { + createWebhook(channel, name, avatar) { return new Promise((resolve, reject) => { this.rest.makeRequest('post', Constants.Endpoints.channelWebhooks(channel.id), true, { - name: name, avatar: avatar, + name, + avatar, }) .then(data => { resolve(new Webhook(this.rest.client, data)); @@ -585,22 +586,15 @@ class RESTMethods { }); } - deleteChannelWebhook(webhook) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('delete', Constants.Endpoints.webhook(webhook.id, webhook.token), false) - .then(resolve).catch(reject); + editWebhook(webhook, name, avatar) { + return this.rest.makeRequest('patch', Constants.Endpoints.webhook(webhook.id, webhook.token), false, { + name, + avatar, }); } - editChannelWebhook(webhook, name, avatar) { - return new Promise((resolve, reject) => { - this.rest.makeRequest('patch', Constants.Endpoints.webhook(webhook.id, webhook.token), false, { - name: name, avatar: avatar, - }) - .then(data => { - resolve(data); - }).catch(reject); - }); + deleteWebhook(webhook) { + return this.rest.makeRequest('delete', Constants.Endpoints.webhook(webhook.id, webhook.token), false); } sendWebhookMessage(webhook, content, { avatarURL, tts, disableEveryone, embeds } = {}, file = null) { diff --git a/src/structures/Guild.js b/src/structures/Guild.js index ad40214b1..d8dae531f 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -301,7 +301,7 @@ class Guild { * @returns {Collection} */ fetchWebhooks() { - return this.client.rest.methods.fetchGuildWebhooks(this); + return this.client.rest.methods.getGuildWebhooks(this); } /** diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index cc1319541..8c0d8974a 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -42,6 +42,38 @@ class TextChannel extends GuildChannel { return members; } + /** + * Fetch all webhooks for the channel. + * @returns {Promise>} + */ + fetchWebhooks() { + return this.client.rest.methods.getChannelWebhooks(this); + } + + /** + * Create a webhook for the channel. + * @param {string} name The name of the webhook. + * @param {FileResolvable} avatar The avatar for the webhook. + * @returns {Promise} webhook The created webhook. + * @example + * channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png') + * .then(webhook => console.log(`Created Webhook ${webhook}`)) + * .catch(console.log) + */ + createWebhook(name, avatar) { + return new Promise((resolve, reject) => { + if (avatar) { + this.client.resolver.resolveFile(avatar).then(file => { + let base64 = new Buffer(file, 'binary').toString('base64'); + let dataURI = `data:;base64,${base64}`; + this.client.rest.methods.createWebhook(this, name, dataURI).then(resolve).catch(reject); + }).catch(reject); + } else { + this.client.rest.methods.createWebhook(this, name).then(resolve).catch(reject); + } + }); + } + // These are here only for documentation purposes - they are implemented by TextBasedChannel sendMessage() { return; } sendTTSMessage() { return; } @@ -56,9 +88,6 @@ class TextChannel extends GuildChannel { get typingCount() { return; } createCollector() { return; } awaitMessages() { return; } - fetchWebhook() { return; } - fetchWebhooks() { return; } - createWebhook() { return; } bulkDelete() { return; } _cacheMessage() { return; } } diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index d9e75d3af..53c89e31a 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -161,11 +161,11 @@ class Webhook { this.client.resolver.resolveFile(avatar).then(file => { let base64 = new Buffer(file, 'binary').toString('base64'); let dataURI = `data:;base64,${base64}`; - this.client.rest.methods.editChannelWebhook(this, name, dataURI) + this.client.rest.methods.editWebhook(this, name, dataURI) .then(resolve).catch(reject); }).catch(reject); } else { - this.client.rest.methods.editChannelWebhook(this, name) + this.client.rest.methods.editWebhook(this, name) .then(data => { this.setup(data); }).catch(reject); @@ -178,7 +178,7 @@ class Webhook { * @returns {Promise} */ delete() { - return this.client.rest.methods.deleteChannelWebhook(this); + return this.client.rest.methods.deleteWebhook(this); } } diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 2f25c6b0d..a772d1590 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -309,49 +309,6 @@ class TextBasedChannel { }); } - /** - * Fetch a webhook by ID - * @param {string} id The id of the webhook. - * @returns {Promise} - */ - fetchWebhook(id) { - return this.client.rest.methods.fetchWebhook(id); - } - - /** - * Fetch all webhooks for the channel. - * @returns {Collection} - */ - fetchWebhooks() { - return this.client.rest.methods.fetchChannelWebhooks(this); - } - - /** - * Create a webhook for the channel. - * @param {string} name The name of the webhook. - * @param {FileResolvable=} avatar The avatar for the webhook. - * @returns {Webhook} webhook The created webhook. - * @example - * channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png') - * .then(webhook => console.log(`Created Webhook ${webhook}`)) - * .catch(console.log) - */ - createWebhook(name, avatar) { - return new Promise((resolve, reject) => { - if (avatar) { - this.client.resolver.resolveFile(avatar).then(file => { - let base64 = new Buffer(file, 'binary').toString('base64'); - let dataURI = `data:;base64,${base64}`; - this.client.rest.methods.createChannelWebhook(this, name, dataURI) - .then(resolve).catch(reject); - }).catch(reject); - } else { - this.client.rest.methods.createChannelWebhook(this, name) - .then(resolve).catch(reject); - } - }); - } - /** * Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after. * Only OAuth Bot accounts may use this method. @@ -388,9 +345,6 @@ exports.applyToClass = (structure, full = false) => { props.push('fetchPinnedMessages'); props.push('createCollector'); props.push('awaitMessages'); - props.push('fetchWebhook'); - props.push('fetchWebhooks'); - props.push('createWebhook'); } for (const prop of props) applyProp(structure, prop); }; From f292e7002f6a6ab8e2233f57b53e8f120b951140 Mon Sep 17 00:00:00 2001 From: comp500 Date: Mon, 10 Oct 2016 03:44:38 +0100 Subject: [PATCH 24/62] fix proxyURL (#783) --- src/structures/MessageAttachment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/MessageAttachment.js b/src/structures/MessageAttachment.js index a2c5c8d95..e9573a7be 100644 --- a/src/structures/MessageAttachment.js +++ b/src/structures/MessageAttachment.js @@ -48,7 +48,7 @@ class MessageAttachment { * The Proxy URL to this attachment * @type {string} */ - this.proxyURL = data.url; + this.proxyURL = data.proxy_url; /** * The height of this attachment (if an image) From e48d7d52f142fb2ebd89c15de1ce725f48045aef Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 10 Oct 2016 00:56:18 -0500 Subject: [PATCH 25/62] add webhook#sendSlackMessage (#788) --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 13 +++++++++++++ src/structures/Webhook.js | 27 ++++++++++++++++++++++++--- 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 2dab3858e..85770b6ca 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476042616008},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":102,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":115,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":142,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":158,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":180,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476077448403},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index c456aa76d..d9b8b14da 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -613,6 +613,19 @@ class RESTMethods { }).catch(reject); }); } + + sendSlackWebhookMessage(webhook, body) { + return new Promise((resolve, reject) => { + this.rest.makeRequest( + 'post', + `${Constants.Endpoints.webhook(webhook.id, webhook.token)}/slack?wait=true`, + false, + body + ).then(data => { + resolve(data); + }).catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 53c89e31a..0e94e8ff6 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -75,12 +75,12 @@ class Webhook { /** * Send a message with this webhook - * @param {StringResolvable} content The content to send - * @param {MessageOptions} [options={}] The options to provide + * @param {StringResolvable} content The content to send. + * @param {MessageOptions} [options={}] The options to provide. * @returns {Promise} * @example * // send a message - * webook.sendMessage('hello!') + * webhook.sendMessage('hello!') * .then(message => console.log(`Sent message: ${message.content}`)) * .catch(console.error); */ @@ -88,6 +88,27 @@ class Webhook { return this.client.rest.methods.sendWebhookMessage(this, content, options); } + /** + * Send a raw slack message with this webhook + * @param {Object} body The raw body to send. + * @returns {Promise} + * @example + * // send a slack message + * webhook.sendSlackMessage({ + * 'username': 'Wumpus', + * 'attachments': [{ + * 'pretext': 'this looks pretty cool', + * 'color': '#F0F', + * 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png', + * 'footer': 'Powered by sneks', + * 'ts': new Date().getTime() / 1000 + * }] + * }).catch(console.log); + */ + sendSlackMessage(body) { + return this.client.rest.methods.sendSlackWebhookMessage(this, body); + } + /** * Send a text-to-speech message with this webhook * @param {StringResolvable} content The content to send From 5ddefc3682cf51d20968bd55fb2c60e9f0da4a89 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 10 Oct 2016 01:54:46 -0500 Subject: [PATCH 26/62] fix webhook#edit (#789) * fix webhook#edit * hehe --- src/client/rest/RESTMethods.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index d9b8b14da..82822635e 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -587,9 +587,15 @@ class RESTMethods { } editWebhook(webhook, name, avatar) { - return this.rest.makeRequest('patch', Constants.Endpoints.webhook(webhook.id, webhook.token), false, { - name, - avatar, + return new Promise((resolve, reject) => { + this.rest.makeRequest('patch', Constants.Endpoints.webhook(webhook.id, webhook.token), false, { + name, + avatar, + }).then(data => { + webhook.name = data.name; + webhook.avatar = data.avatar; + resolve(webhook); + }).catch(reject); }); } From 32eeb8ad5ec70bc2eaae7a0dbef8984f7cd919b6 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 10 Oct 2016 01:55:09 -0500 Subject: [PATCH 27/62] Fix feature/login (#790) * eeeeeeee * too tired * ok gawdl3y Signed-off-by: Gus Caplan --- src/client/Client.js | 2 +- src/client/rest/RESTMethods.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index 0117b339c..b2ed42f1e 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -20,7 +20,7 @@ class Client extends EventEmitter { /** * @param {ClientOptions} [options] Options for the client */ - constructor(options) { + constructor(options = {}) { super(); // Obtain shard details from environment diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 82822635e..fed7ab7fd 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -15,6 +15,7 @@ class RESTMethods { } loginToken(token) { + token = token.replace('Bot ', ''); return new Promise((resolve, reject) => { this.rest.client.manager.connectToWebSocket(token, resolve, reject); }); @@ -27,7 +28,7 @@ class RESTMethods { this.rest.client.password = password; this.rest.makeRequest('post', Constants.Endpoints.login, false, { email, password }) .then(data => { - this.rest.client.manager.connectToWebSocket(data.token, resolve, reject); + resolve(this.loginToken(data.token)); }) .catch(reject); }); From 96355a4968e258581c2a669f8c23fd24e8e2899b Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 10 Oct 2016 14:53:54 -0500 Subject: [PATCH 28/62] add constants, some debug stuff (#791) * add constants, some debug stuff * i can't believe i did this --- src/client/ClientManager.js | 1 + src/client/websocket/WebSocketManager.js | 2 +- src/client/websocket/packets/WebSocketPacketManager.js | 2 ++ src/util/Constants.js | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index 552554b7a..dc255cfcf 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -49,6 +49,7 @@ class ClientManager { */ setupKeepAlive(time) { this.heartbeatInterval = this.client.setInterval(() => { + this.client.emit('debug', 'SENDING HEARTBEAT'); this.client.ws.send({ op: Constants.OPCodes.HEARTBEAT, d: this.client.ws.sequence, diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index aee234cc5..bc22249d2 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -221,7 +221,7 @@ class WebSocketManager extends EventEmitter { this.client.emit('raw', packet); - if (packet.op === 10) this.client.manager.setupKeepAlive(packet.d.heartbeat_interval); + if (packet.op === Constants.OPCodes.HELLO) this.client.manager.setupKeepAlive(packet.d.heartbeat_interval); return this.packetManager.handle(packet); } diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 0c2b025cc..4edf566f2 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -77,6 +77,8 @@ class WebSocketPacketManager { return false; } + if (packet.op === Constants.OPCodes.HEARTBEAT_ACK) this.ws.client.emit('debug', 'HEARTBEAT ACK'); + if (this.ws.status === Constants.Status.RECONNECTING) { this.ws.reconnecting = false; this.ws.checkIfReady(); diff --git a/src/util/Constants.js b/src/util/Constants.js index f816d84b4..91486f935 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -140,6 +140,8 @@ exports.OPCodes = { RECONNECT: 7, REQUEST_GUILD_MEMBERS: 8, INVALID_SESSION: 9, + HELLO: 10, + HEARTBEAT_ACK: 11, }; exports.VoiceOPCodes = { From 0de3d1bfc49a9021dd6b9965b670f116e16594c5 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Tue, 11 Oct 2016 19:20:59 -0500 Subject: [PATCH 29/62] make sharding manager constructor better (#794) * add color stuff to support popular color libraries * make this better * fix docs --- docs/docs.json | 2 +- src/sharding/Shard.js | 5 +++-- src/sharding/ShardingManager.js | 29 +++++++++++++++++++---------- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 85770b6ca..b5a16892a 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476077448403},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":51,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":69,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":97,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":19,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":25,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":31,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"totalShards","description":"Number of shards to default to spawning","optional":true,"type":{"types":[[["number",""]]]}},{"name":"respawn","description":"Respawn a shard when it dies","optional":true,"type":{"types":[[["boolean",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":115,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":126,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":141,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":54,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":65,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476173357011},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs=","description":"Optional command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":52,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":70,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":98,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":71,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":124,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":135,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":150,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["array",""]]]},"meta":{"line":57,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":74,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/sharding/Shard.js b/src/sharding/Shard.js index 1c454d048..647a0a2cf 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -10,8 +10,9 @@ class Shard { /** * @param {ShardingManager} manager The sharding manager * @param {number} id The ID of this shard + * @param {array} [spawnArgs=] Optional command line arguments to pass to the shard */ - constructor(manager, id) { + constructor(manager, id, spawnArgs = []) { /** * Manager that created the shard * @type {ShardingManager} @@ -28,7 +29,7 @@ class Shard { * Process of the shard * @type {ChildProcess} */ - this.process = childProcess.fork(path.resolve(this.manager.file), [], { + this.process = childProcess.fork(path.resolve(this.manager.file), spawnArgs, { env: { SHARD_ID: this.id, SHARD_COUNT: this.manager.totalShards, diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index da4df2d56..6272709c2 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -1,7 +1,7 @@ const path = require('path'); const fs = require('fs'); const EventEmitter = require('events').EventEmitter; - +const mergeDefault = require('../util/MergeDefault'); const Shard = require('./Shard'); const Collection = require('../util/Collection'); @@ -14,12 +14,13 @@ const Collection = require('../util/Collection'); class ShardingManager extends EventEmitter { /** * @param {string} file Path to your shard script file - * @param {number} [totalShards=1] Number of shards to default to spawning - * @param {boolean} [respawn=true] Respawn a shard when it dies + * @param {Object} options The options for the sharding manager. */ - constructor(file, totalShards = 1, respawn = true) { + constructor(file, options = {}) { super(); + options = mergeDefault({ totalShards: 1, respawn: true, spawnArgs: [] }, options); + /** * Path to the shard script file * @type {string} @@ -34,18 +35,26 @@ class ShardingManager extends EventEmitter { * Amount of shards that this manager is going to spawn * @type {number} */ - this.totalShards = totalShards; - if (typeof totalShards !== 'number' || isNaN(totalShards)) { + if (typeof options.totalShards !== 'number' || isNaN(options.totalShards)) { throw new TypeError('Amount of shards must be a number.'); } - if (totalShards < 1) throw new RangeError('Amount of shards must be at least 1.'); - if (totalShards !== Math.floor(totalShards)) throw new RangeError('Amount of shards must be an integer.'); + if (options.totalShards < 1) throw new RangeError('Amount of shards must be at least 1.'); + if (options.totalShards !== Math.floor(options.totalShards)) { + throw new RangeError('Amount of shards must be an integer.'); + } + this.totalShards = options.totalShards; /** * Whether shards should automatically respawn upon exiting * @type {boolean} */ - this.respawn = respawn; + this.respawn = options.respawn; + + /** + * An array of arguments to pass to shards. + * @type {array} + */ + this.spawnArgs = options.spawnArgs; /** * A collection of shards that this manager has spawned @@ -60,7 +69,7 @@ class ShardingManager extends EventEmitter { * @returns {Promise} */ createShard(id = this.shards.size) { - const shard = new Shard(this, id); + const shard = new Shard(this, id, this.spawnArgs); this.shards.set(id, shard); /** * Emitted upon launching a shard From 299484ff68a639938eabfb0288c2f4e8701c5aed Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Tue, 11 Oct 2016 19:29:29 -0500 Subject: [PATCH 30/62] allow overwritePermissions to take a role id (#792) * allow overwritePermissions to take a role id * Fix typo --- docs/docs.json | 2 +- src/structures/GuildChannel.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index b5a16892a..fcebb6f9e 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476173357011},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs=","description":"Optional command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":52,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":70,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":98,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":71,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":124,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":135,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":150,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["array",""]]]},"meta":{"line":57,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":74,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["Role",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":175,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":189,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":203,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":220,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":230,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":261,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":207,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476231958722},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs=","description":"Optional command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":52,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":70,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":98,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":71,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":124,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":135,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":150,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["array",""]]]},"meta":{"line":57,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":74,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolveable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolveable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolveable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 417500d9c..3eb97a4f6 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -111,7 +111,7 @@ class GuildChannel extends Channel { /** * Overwrites the permissions for a user or role in this channel. - * @param {Role|UserResolvable} userOrRole The user or role to update + * @param {RoleResolvable|UserResolvable} userOrRole The user or role to update * @param {PermissionOverwriteOptions} options The configuration for the update * @returns {Promise} * @example @@ -130,6 +130,9 @@ class GuildChannel extends Channel { if (userOrRole instanceof Role) { payload.type = 'role'; + } else if (this.guild.roles.has(userOrRole)) { + userOrRole = this.guild.roles.get(userOrRole); + payload.type = 'role'; } else { userOrRole = this.client.resolver.resolveUser(userOrRole); payload.type = 'member'; From 26804f36736a0dcc9b9d13d29477acc3f6534cb7 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Wed, 12 Oct 2016 02:26:50 -0400 Subject: [PATCH 31/62] Reorganise resolver --- src/client/ClientDataResolver.js | 58 ++++++++++++++++---------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index f8f027e0d..60870d8c0 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -99,23 +99,6 @@ class ClientDataResolver { return guild.members.get(user.id) || null; } - /** - * Data that resolves to give a Base64 string, typically for image uploading. This can be: - * * A Buffer - * * A Base64 string - * @typedef {Buffer|string} Base64Resolvable - */ - - /** - * Resolves a Base64Resolvable to a Base 64 image - * @param {Base64Resolvable} data The base 64 resolvable you want to resolve - * @returns {?string} - */ - resolveBase64(data) { - if (data instanceof Buffer) return `data:image/jpg;base64,${data.toString('base64')}`; - return data; - } - /** * Data that can be resolved to give a Channel. This can be: * * An instance of a Channel @@ -138,6 +121,26 @@ class ClientDataResolver { return null; } + /** + * Data that can be resolved to give an invite code. This can be: + * * An invite code + * * An invite URL + * @typedef {string} InviteResolvable + */ + + /** + * Resolves InviteResolvable to an invite code + * @param {InviteResolvable} data The invite resolvable to resolve + * @returns {string} + */ + resolveInviteCode(data) { + const inviteRegex = /discord(?:app)?\.(?:gg|com\/invite)\/([a-z0-9]{5})/i; + const match = inviteRegex.exec(data); + + if (match && match[1]) return match[1]; + return data; + } + /** * Data that can be resolved to give a permission number. This can be: * * A string @@ -206,22 +209,19 @@ class ClientDataResolver { } /** - * Data that can be resolved to give an invite code. This can be: - * * An invite code - * * An invite URL - * @typedef {string} InviteResolvable + * Data that resolves to give a Base64 string, typically for image uploading. This can be: + * * A Buffer + * * A Base64 string + * @typedef {Buffer|string} Base64Resolvable */ /** - * Resolves InviteResolvable to an invite code - * @param {InviteResolvable} data The invite resolvable to resolve - * @returns {string} + * Resolves a Base64Resolvable to a Base 64 image + * @param {Base64Resolvable} data The base 64 resolvable you want to resolve + * @returns {?string} */ - resolveInviteCode(data) { - const inviteRegex = /discord(?:app)?\.(?:gg|com\/invite)\/([a-z0-9]{5})/i; - const match = inviteRegex.exec(data); - - if (match && match[1]) return match[1]; + resolveBase64(data) { + if (data instanceof Buffer) return `data:image/jpg;base64,${data.toString('base64')}`; return data; } From 492f706035d9872d37f076659d8e5b95846e0bbd Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 13 Oct 2016 20:05:07 -0400 Subject: [PATCH 32/62] Fix Gus' log messages --- src/client/ClientManager.js | 2 +- src/client/websocket/packets/WebSocketPacketManager.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index dc255cfcf..89acc523a 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -49,7 +49,7 @@ class ClientManager { */ setupKeepAlive(time) { this.heartbeatInterval = this.client.setInterval(() => { - this.client.emit('debug', 'SENDING HEARTBEAT'); + this.client.emit('debug', 'Sending heartbeat'); this.client.ws.send({ op: Constants.OPCodes.HEARTBEAT, d: this.client.ws.sequence, diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 4edf566f2..31e08d0fb 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -77,7 +77,7 @@ class WebSocketPacketManager { return false; } - if (packet.op === Constants.OPCodes.HEARTBEAT_ACK) this.ws.client.emit('debug', 'HEARTBEAT ACK'); + if (packet.op === Constants.OPCodes.HEARTBEAT_ACK) this.ws.client.emit('debug', 'Heartbeat acknowledged'); if (this.ws.status === Constants.Status.RECONNECTING) { this.ws.reconnecting = false; From 853a3dfa04ab1d21a94888a962edf25068a0b955 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Thu, 13 Oct 2016 22:26:10 -0500 Subject: [PATCH 33/62] Add getRecommendedShards and automatic shard count in ShardingManager (#796) * draft stuff fix docstring for Client#token Reorganise resolver make env better for shards, clean up docs Fix Gus' log messages 7 meh just gateway/bot not v7 :( final changes, ready for mergin! build docs make default totalShards 'auto', fix docs for totalShards type clean up docs more run docs * make consistancy real * Update and rename getRecommendedShards.js to GetRecommendedShards.js * Update GetRecommendedShards.js * Update index.js * Update RESTMethods.js * Update Shard.js * Update GetRecommendedShards.js * Update ShardingManager.js * run docs --- docs/docs.json | 2 +- src/client/Client.js | 14 +++++--- src/client/rest/RESTMethods.js | 6 +++- src/index.js | 1 + src/sharding/Shard.js | 17 +++++++--- src/sharding/ShardingManager.js | 56 ++++++++++++++++++++++++-------- src/util/Constants.js | 1 + src/util/GetRecommendedShards.js | 19 +++++++++++ 8 files changed, 90 insertions(+), 26 deletions(-) create mode 100644 src/util/GetRecommendedShards.js diff --git a/docs/docs.json b/docs/docs.json index fcebb6f9e..732837f18 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476231958722},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":223,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":232,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":252,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":267,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":277,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":287,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":299,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":121,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":139,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":145,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":160,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":169,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":178,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":187,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":200,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":400,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":406,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs=","description":"Optional command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":52,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":70,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":98,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nThe Sharding Manager is still experimental","meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":71,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":124,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":135,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":150,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["array",""]]]},"meta":{"line":57,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":74,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolveable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolveable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolveable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":119,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":141,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":189,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":208,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476415444066},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs","description":"Command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":99,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":152,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":163,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":178,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":49,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":55,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token that will be passed to the shards. Also used for auto shard count.","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":73,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":84,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index b2ed42f1e..652c11f16 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -114,11 +114,15 @@ class Client extends EventEmitter { */ this.presences = new Collection(); - /** - * The authorization token for the logged in user/bot. - * @type {?string} - */ - this.token = null; + if (!this.token && 'CLIENT_TOKEN' in process.env) { + /** + * The authorization token for the logged in user/bot. + * @type {?string} + */ + this.token = process.env.CLIENT_TOKEN; + } else { + this.token = null; + } /** * The email, if there is one, for the logged in Client diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index fed7ab7fd..8cbd40b2b 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -14,7 +14,7 @@ class RESTMethods { this.rest = restManager; } - loginToken(token) { + loginToken(token = this.rest.client.token) { token = token.replace('Bot ', ''); return new Promise((resolve, reject) => { this.rest.client.manager.connectToWebSocket(token, resolve, reject); @@ -49,6 +49,10 @@ class RESTMethods { }); } + getBotGateway() { + return this.rest.makeRequest('get', Constants.Endpoints.botGateway, true); + } + sendMessage(channel, content, { tts, nonce, disableEveryone, split } = {}, file = null) { return new Promise((resolve, reject) => { if (typeof content !== 'undefined') content = this.rest.client.resolver.resolveString(content); diff --git a/src/index.js b/src/index.js index 24b5a26da..cd2d86ba4 100644 --- a/src/index.js +++ b/src/index.js @@ -8,6 +8,7 @@ module.exports = { Collection: require('./util/Collection'), splitMessage: require('./util/SplitMessage'), escapeMarkdown: require('./util/EscapeMarkdown'), + getRecommendedShards: require('./util/GetRecommendedShards'), Channel: require('./structures/Channel'), ClientUser: require('./structures/ClientUser'), diff --git a/src/sharding/Shard.js b/src/sharding/Shard.js index 647a0a2cf..5f7eb2e4b 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -10,7 +10,7 @@ class Shard { /** * @param {ShardingManager} manager The sharding manager * @param {number} id The ID of this shard - * @param {array} [spawnArgs=] Optional command line arguments to pass to the shard + * @param {array} [spawnArgs=[]] Command line arguments to pass to the shard */ constructor(manager, id, spawnArgs = []) { /** @@ -25,15 +25,22 @@ class Shard { */ this.id = id; + /** + * The environment variables for the shard + * @type {Object} + */ + this.env = { + SHARD_ID: this.id, + SHARD_COUNT: this.manager.totalShards, + }; + if (this.manager.token) this.env.CLIENT_TOKEN = this.manager.token; + /** * Process of the shard * @type {ChildProcess} */ this.process = childProcess.fork(path.resolve(this.manager.file), spawnArgs, { - env: { - SHARD_ID: this.id, - SHARD_COUNT: this.manager.totalShards, - }, + env: this.env, }); this.process.on('message', this._handleMessage.bind(this)); this.process.once('exit', () => { diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 6272709c2..f0829c6df 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -4,10 +4,12 @@ const EventEmitter = require('events').EventEmitter; const mergeDefault = require('../util/MergeDefault'); const Shard = require('./Shard'); const Collection = require('../util/Collection'); +const getRecommendedShards = require('../util/GetRecommendedShards'); /** * This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate * from the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely. + * If you do not select an amount of shards, the manager will automatically decide the best amount. * The Sharding Manager is still experimental * @extends {EventEmitter} */ @@ -18,8 +20,7 @@ class ShardingManager extends EventEmitter { */ constructor(file, options = {}) { super(); - - options = mergeDefault({ totalShards: 1, respawn: true, spawnArgs: [] }, options); + options = mergeDefault({ totalShards: 'auto', respawn: true, spawnArgs: [], token: null }, options); /** * Path to the shard script file @@ -31,17 +32,20 @@ class ShardingManager extends EventEmitter { const stats = fs.statSync(this.file); if (!stats.isFile()) throw new Error('File path does not point to a file.'); + if (options.totalShards !== 'auto') { + if (typeof options.totalShards !== 'number' || isNaN(options.totalShards)) { + throw new TypeError('Amount of shards must be a number.'); + } + if (options.totalShards < 1) throw new RangeError('Amount of shards must be at least 1.'); + if (options.totalShards !== Math.floor(options.totalShards)) { + throw new RangeError('Amount of shards must be an integer.'); + } + } + /** * Amount of shards that this manager is going to spawn - * @type {number} + * @type {number|string} */ - if (typeof options.totalShards !== 'number' || isNaN(options.totalShards)) { - throw new TypeError('Amount of shards must be a number.'); - } - if (options.totalShards < 1) throw new RangeError('Amount of shards must be at least 1.'); - if (options.totalShards !== Math.floor(options.totalShards)) { - throw new RangeError('Amount of shards must be an integer.'); - } this.totalShards = options.totalShards; /** @@ -52,10 +56,16 @@ class ShardingManager extends EventEmitter { /** * An array of arguments to pass to shards. - * @type {array} + * @type {string[]} */ this.spawnArgs = options.spawnArgs; + /** + * Token that will be passed to the shards. Also used for auto shard count. + * @type {string} + */ + this.token = options.token || null; + /** * A collection of shards that this manager has spawned * @type {Collection} @@ -87,10 +97,28 @@ class ShardingManager extends EventEmitter { * @returns {Promise>} */ spawn(amount = this.totalShards, delay = 5500) { - if (typeof amount !== 'number' || isNaN(amount)) throw new TypeError('Amount of shards must be a number.'); - if (amount < 1) throw new RangeError('Amount of shards must be at least 1.'); - if (amount !== Math.floor(amount)) throw new RangeError('Amount of shards must be an integer.'); + return new Promise((resolve, reject) => { + if (amount === 'auto') { + getRecommendedShards(this.token).then(count => { + resolve(this._spawn(count, delay)); + }).catch(reject); + } else { + if (typeof amount !== 'number' || isNaN(amount)) throw new TypeError('Amount of shards must be a number.'); + if (amount < 1) throw new RangeError('Amount of shards must be at least 1.'); + if (amount !== Math.floor(amount)) throw new TypeError('Amount of shards must be an integer.'); + resolve(this._spawn(amount, delay)); + } + }); + } + /** + * Actually spawns shards, unlike that poser above >:( + * @param {number} amount Number of shards to spawn + * @param {number} delay How long to wait in between spawning each shard (in milliseconds) + * @returns {Promise>} + * @private + */ + _spawn(amount, delay) { return new Promise(resolve => { if (this.shards.size >= amount) throw new Error(`Already spawned ${this.shards.size} shards.`); this.totalShards = amount; diff --git a/src/util/Constants.js b/src/util/Constants.js index 91486f935..e6a33d7d1 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -72,6 +72,7 @@ const Endpoints = exports.Endpoints = { login: `${API}/auth/login`, logout: `${API}/auth/logout`, gateway: `${API}/gateway`, + botGateway: `${API}/gateway/bot`, invite: (id) => `${API}/invite/${id}`, inviteLink: (id) => `https://discord.gg/${id}`, CDN: 'https://cdn.discordapp.com', diff --git a/src/util/GetRecommendedShards.js b/src/util/GetRecommendedShards.js new file mode 100644 index 000000000..efd8f8be1 --- /dev/null +++ b/src/util/GetRecommendedShards.js @@ -0,0 +1,19 @@ +const superagent = require('superagent'); +const botGateway = require('./Constants').Endpoints.botGateway; + +/** + * Gets the recommended shard count from Discord + * @param {number} token Discord auth token + * @returns {Promise} the recommended number of shards + */ +module.exports = function getRecommendedShards(token) { + return new Promise((resolve, reject) => { + if (!token) reject(new Error('A token must be provided.')); + superagent.get(botGateway) + .set('Authorization', `Bot ${token.replace('Bot ', '')}`) + .end((err, res) => { + if (err) reject(err); + resolve(res.body.shards); + }); + }); +}; From aad06c1116cd78b79331d67bb11b9938a9678e33 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 13 Oct 2016 23:32:52 -0400 Subject: [PATCH 34/62] Teensy cleanup --- docs/docs.json | 2 +- src/sharding/ShardingManager.js | 4 ++-- src/util/GetRecommendedShards.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 732837f18..960e0e7c8 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476415444066},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs","description":"Command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":99,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":152,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":163,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":178,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":49,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":55,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token that will be passed to the shards. Also used for auto shard count.","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":73,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":84,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476415966921},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs","description":"Command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":99,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":152,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":163,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":178,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":49,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":55,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":73,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":84,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index f0829c6df..45d67df76 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -61,10 +61,10 @@ class ShardingManager extends EventEmitter { this.spawnArgs = options.spawnArgs; /** - * Token that will be passed to the shards. Also used for auto shard count. + * Token to use for obtaining the automatic shard count, and passing to shards * @type {string} */ - this.token = options.token || null; + this.token = options.token; /** * A collection of shards that this manager has spawned diff --git a/src/util/GetRecommendedShards.js b/src/util/GetRecommendedShards.js index efd8f8be1..050740218 100644 --- a/src/util/GetRecommendedShards.js +++ b/src/util/GetRecommendedShards.js @@ -8,7 +8,7 @@ const botGateway = require('./Constants').Endpoints.botGateway; */ module.exports = function getRecommendedShards(token) { return new Promise((resolve, reject) => { - if (!token) reject(new Error('A token must be provided.')); + if (!token) throw new Error('A token must be provided.'); superagent.get(botGateway) .set('Authorization', `Bot ${token.replace('Bot ', '')}`) .end((err, res) => { From 3293f9a8de0237d5c132e51345585f057cdf14a6 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Thu, 13 Oct 2016 23:58:32 -0400 Subject: [PATCH 35/62] Add automatic shard spawning, and document options --- docs/docs.json | 2 +- src/sharding/ShardingManager.js | 56 +++++++++++++++++++++++++-------- 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 960e0e7c8..5bc47fc3a 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476415966921},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs","description":"Command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"The options for the sharding manager.","type":{"types":[[["Object",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":99,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":152,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":163,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":178,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":49,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":55,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":73,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":84,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476417495126},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs","description":"Command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.autoShardInterval","description":"How frequently to automatically spawn another shard if needed\r(in seconds) - only applicable if `totalShards` is `auto`","optional":true,"type":{"types":[[["number",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.spawnArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":129,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":182,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":193,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":208,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#autoShardInterval","name":"autoShardInterval","description":"How frequently to check the recommend shard count and spawn a new shard if necessary (in seconds).\rOnly applicable when `totalShards` is `auto`.","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":82,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":88,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":94,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":114,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 45d67df76..8ff1fc83c 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -16,11 +16,23 @@ const getRecommendedShards = require('../util/GetRecommendedShards'); class ShardingManager extends EventEmitter { /** * @param {string} file Path to your shard script file - * @param {Object} options The options for the sharding manager. + * @param {Object} [options] Options for the sharding manager + * @param {number|string} [options.totalShards='auto'] Number of shards to spawn, or "auto" + * @param {number} [options.autoShardInterval=600] How frequently to automatically spawn another shard if needed + * (in seconds) - only applicable if `totalShards` is `auto` + * @param {boolean} [options.respawn=true] Whether shards should automatically respawn upon exiting + * @param {string[]} [options.spawnArgs=[]] Arguments to pass to the shard script when spawning + * @param {string} [options.token] Token to use for automatic shard count and passing to shards */ constructor(file, options = {}) { super(); - options = mergeDefault({ totalShards: 'auto', respawn: true, spawnArgs: [], token: null }, options); + options = mergeDefault({ + totalShards: 'auto', + autoShardInterval: 600, + respawn: true, + spawnArgs: [], + token: null, + }, options); /** * Path to the shard script file @@ -32,21 +44,30 @@ class ShardingManager extends EventEmitter { const stats = fs.statSync(this.file); if (!stats.isFile()) throw new Error('File path does not point to a file.'); - if (options.totalShards !== 'auto') { - if (typeof options.totalShards !== 'number' || isNaN(options.totalShards)) { - throw new TypeError('Amount of shards must be a number.'); - } - if (options.totalShards < 1) throw new RangeError('Amount of shards must be at least 1.'); - if (options.totalShards !== Math.floor(options.totalShards)) { - throw new RangeError('Amount of shards must be an integer.'); - } - } - /** * Amount of shards that this manager is going to spawn * @type {number|string} */ this.totalShards = options.totalShards; + if (this.totalShards !== 'auto') { + if (typeof this.totalShards !== 'number' || isNaN(this.totalShards)) { + throw new TypeError('Amount of shards must be a number.'); + } + if (this.totalShards < 1) throw new RangeError('Amount of shards must be at least 1.'); + if (this.totalShards !== Math.floor(this.totalShards)) { + throw new RangeError('Amount of shards must be an integer.'); + } + } + + /** + * How frequently to check the recommend shard count and spawn a new shard if necessary (in seconds). + * Only applicable when `totalShards` is `auto`. + * @type {number} + */ + this.autoShardInterval = options.autoShardInterval; + if (typeof this.autoShardInterval !== 'number' || isNaN(this.autoShardInterval)) { + throw new TypeError('The autoShardInterval option must be a number.'); + } /** * Whether shards should automatically respawn upon exiting @@ -62,7 +83,7 @@ class ShardingManager extends EventEmitter { /** * Token to use for obtaining the automatic shard count, and passing to shards - * @type {string} + * @type {?string} */ this.token = options.token; @@ -71,6 +92,15 @@ class ShardingManager extends EventEmitter { * @type {Collection} */ this.shards = new Collection(); + + // Set up automatic shard creation interval + if (this.totalShards === 'auto' && this.autoShardInterval > 0) { + setInterval(() => { + getRecommendedShards(this.token).then(count => { + if (this.shards.size < count) this.createShard(); + }); + }, this.autoShardInterval); + } } /** From 915a4cbe37ac09cc311a9fc4c06d4ecd99061e32 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 00:00:15 -0400 Subject: [PATCH 36/62] Rename spawnArgs -> shardArgs --- docs/docs.json | 2 +- src/sharding/Shard.js | 6 +++--- src/sharding/ShardingManager.js | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 5bc47fc3a..3da4e8714 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476417495126},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"spawnArgs","description":"Command line arguments to pass to the shard","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.autoShardInterval","description":"How frequently to automatically spawn another shard if needed\r(in seconds) - only applicable if `totalShards` is `auto`","optional":true,"type":{"types":[[["number",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.spawnArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":129,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":182,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":193,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":208,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#autoShardInterval","name":"autoShardInterval","description":"How frequently to check the recommend shard count and spawn a new shard if necessary (in seconds).\rOnly applicable when `totalShards` is `auto`.","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#spawnArgs","name":"spawnArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":82,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":88,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":94,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":114,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476417601385},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.autoShardInterval","description":"How frequently to automatically spawn another shard if needed\r(in seconds) - only applicable if `totalShards` is `auto`","optional":true,"type":{"types":[[["number",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":129,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":182,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":193,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":208,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#autoShardInterval","name":"autoShardInterval","description":"How frequently to check the recommend shard count and spawn a new shard if necessary (in seconds).\rOnly applicable when `totalShards` is `auto`.","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":82,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":88,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":94,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":114,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/sharding/Shard.js b/src/sharding/Shard.js index 5f7eb2e4b..364861b7f 100644 --- a/src/sharding/Shard.js +++ b/src/sharding/Shard.js @@ -10,9 +10,9 @@ class Shard { /** * @param {ShardingManager} manager The sharding manager * @param {number} id The ID of this shard - * @param {array} [spawnArgs=[]] Command line arguments to pass to the shard + * @param {array} [args=[]] Command line arguments to pass to the script */ - constructor(manager, id, spawnArgs = []) { + constructor(manager, id, args = []) { /** * Manager that created the shard * @type {ShardingManager} @@ -39,7 +39,7 @@ class Shard { * Process of the shard * @type {ChildProcess} */ - this.process = childProcess.fork(path.resolve(this.manager.file), spawnArgs, { + this.process = childProcess.fork(path.resolve(this.manager.file), args, { env: this.env, }); this.process.on('message', this._handleMessage.bind(this)); diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 8ff1fc83c..dd4e4e529 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -21,7 +21,7 @@ class ShardingManager extends EventEmitter { * @param {number} [options.autoShardInterval=600] How frequently to automatically spawn another shard if needed * (in seconds) - only applicable if `totalShards` is `auto` * @param {boolean} [options.respawn=true] Whether shards should automatically respawn upon exiting - * @param {string[]} [options.spawnArgs=[]] Arguments to pass to the shard script when spawning + * @param {string[]} [options.shardArgs=[]] Arguments to pass to the shard script when spawning * @param {string} [options.token] Token to use for automatic shard count and passing to shards */ constructor(file, options = {}) { @@ -30,7 +30,7 @@ class ShardingManager extends EventEmitter { totalShards: 'auto', autoShardInterval: 600, respawn: true, - spawnArgs: [], + shardArgs: [], token: null, }, options); @@ -79,7 +79,7 @@ class ShardingManager extends EventEmitter { * An array of arguments to pass to shards. * @type {string[]} */ - this.spawnArgs = options.spawnArgs; + this.shardArgs = options.shardArgs; /** * Token to use for obtaining the automatic shard count, and passing to shards @@ -109,7 +109,7 @@ class ShardingManager extends EventEmitter { * @returns {Promise} */ createShard(id = this.shards.size) { - const shard = new Shard(this, id, this.spawnArgs); + const shard = new Shard(this, id, this.shardArgs); this.shards.set(id, shard); /** * Emitted upon launching a shard From 485ffd267e40d7c9128f25f952c1e150decc63e2 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 00:21:08 -0400 Subject: [PATCH 37/62] Remove auto shard spawn interval (Discord doesn't support such a great idea :eyes:) --- docs/docs.json | 2 +- src/sharding/ShardingManager.js | 22 ---------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 3da4e8714..730eb3151 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476417601385},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.autoShardInterval","description":"How frequently to automatically spawn another shard if needed\r(in seconds) - only applicable if `totalShards` is `auto`","optional":true,"type":{"types":[[["number",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":111,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":129,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":182,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":193,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":208,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":51,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#autoShardInterval","name":"autoShardInterval","description":"How frequently to check the recommend shard count and spawn a new shard if necessary (in seconds).\rOnly applicable when `totalShards` is `auto`.","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":67,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":82,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":88,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":94,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":114,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476418835564},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index dd4e4e529..2d770472d 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -18,8 +18,6 @@ class ShardingManager extends EventEmitter { * @param {string} file Path to your shard script file * @param {Object} [options] Options for the sharding manager * @param {number|string} [options.totalShards='auto'] Number of shards to spawn, or "auto" - * @param {number} [options.autoShardInterval=600] How frequently to automatically spawn another shard if needed - * (in seconds) - only applicable if `totalShards` is `auto` * @param {boolean} [options.respawn=true] Whether shards should automatically respawn upon exiting * @param {string[]} [options.shardArgs=[]] Arguments to pass to the shard script when spawning * @param {string} [options.token] Token to use for automatic shard count and passing to shards @@ -28,7 +26,6 @@ class ShardingManager extends EventEmitter { super(); options = mergeDefault({ totalShards: 'auto', - autoShardInterval: 600, respawn: true, shardArgs: [], token: null, @@ -59,16 +56,6 @@ class ShardingManager extends EventEmitter { } } - /** - * How frequently to check the recommend shard count and spawn a new shard if necessary (in seconds). - * Only applicable when `totalShards` is `auto`. - * @type {number} - */ - this.autoShardInterval = options.autoShardInterval; - if (typeof this.autoShardInterval !== 'number' || isNaN(this.autoShardInterval)) { - throw new TypeError('The autoShardInterval option must be a number.'); - } - /** * Whether shards should automatically respawn upon exiting * @type {boolean} @@ -92,15 +79,6 @@ class ShardingManager extends EventEmitter { * @type {Collection} */ this.shards = new Collection(); - - // Set up automatic shard creation interval - if (this.totalShards === 'auto' && this.autoShardInterval > 0) { - setInterval(() => { - getRecommendedShards(this.token).then(count => { - if (this.shards.size < count) this.createShard(); - }); - }, this.autoShardInterval); - } } /** From 1ef00d0fe77f8c2bdce55b25beab182e247bd273 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 00:52:25 -0400 Subject: [PATCH 38/62] Change node-opus and opusscript to peer deps --- README.md | 12 +++++++----- docs/custom/documents/welcome.md | 12 +++++++----- package.json | 8 ++++---- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 1a3e4472d..c5f336cba 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,14 @@ discord.js is a powerful node.js module that allows you to interact with the [Di ## Installation **Node.js 6.0.0 or newer is required.** -With voice support: `npm install --save discord.js --production` -Without voice support: `npm install --save discord.js --production --no-optional` +Without voice support: `npm install discord.js --save --production` +With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` +With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` +If both audio packages are installed, discord.js will automatically choose node-opus. -By default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections. -If you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus). -discord.js will automatically prefer node-opus over opusscript. +The preferred audio engine is node-opus, as it performs significantly better than opusscript. +Using opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge. +For production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers. ## Example Usage ```js diff --git a/docs/custom/documents/welcome.md b/docs/custom/documents/welcome.md index 74483b166..f51e3c512 100644 --- a/docs/custom/documents/welcome.md +++ b/docs/custom/documents/welcome.md @@ -20,12 +20,14 @@ stable and performant than previous versions. ## Installation **Node.js 6.0.0 or newer is required.** -With voice support: `npm install --save discord.js --production` -Without voice support: `npm install --save discord.js --production --no-optional` +Without voice support: `npm install discord.js --save --production` +With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` +With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` +If both audio packages are installed, discord.js will automatically prefer node-opus. -By default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections. -If you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus). -discord.js will automatically prefer node-opus over opusscript. +The preferred audio engine is node-opus, as it performs significantly better than opusscript. +Using opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge. +For production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers. ## Guides * [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/) diff --git a/package.json b/package.json index 9d5e24950..3fb7ed856 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,10 @@ "dependencies": { "superagent": "^2.2.0", "tweetnacl": "^0.14.3", - "ws": "^1.1.1", + "ws": "^1.1.1" + }, + "peerDependencies": { + "node-opus": "^0.2.1", "opusscript": "^0.0.1" }, "devDependencies": { @@ -36,9 +39,6 @@ "jsdoc-parse": "^1.2.0", "eslint": "^3.4.0" }, - "optionalDependencies": { - "node-opus": "^0.2.1" - }, "engines": { "node": ">=6.0.0" } From ca4e9549a0be09077069d2db6beb0d5c641c3674 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 01:13:50 -0400 Subject: [PATCH 39/62] Add link to Yeoman generator --- README.md | 2 ++ docs/docs.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c5f336cba..032245e0b 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,8 @@ client.on('message', message => { client.login('your token'); ``` +A bot template using discord.js can be generated using [generator-discordbot](https://www.npmjs.com/package/generator-discordbot). + ## Links * [Website](http://hydrabolt.github.io/discord.js/) * [Discord.js Server](https://discord.gg/bRCvFy9) diff --git a/docs/docs.json b/docs/docs.json index 730eb3151..9e8c638bf 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476418835564},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWith voice support: `npm install --save discord.js --production` \r\nWithout voice support: `npm install --save discord.js --production --no-optional`\r\n\r\nBy default, discord.js uses [opusscript](https://www.npmjs.com/package/opusscript) when playing audio over voice connections.\r\nIf you're looking to play over multiple voice connections, it might be better to install [node-opus](https://www.npmjs.com/package/node-opus).\r\ndiscord.js will automatically prefer node-opus over opusscript.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476422023473},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file From 84bca168b657696feb14b6f29004fc7f992d2222 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 01:26:54 -0400 Subject: [PATCH 40/62] Update docs --- CONTRIBUTING.md | 8 ++++---- README.md | 21 +++++++++++++-------- docs/custom/documents/welcome.md | 10 +++++----- docs/docs.json | 2 +- 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4afe7392a..4d1c83166 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,8 +7,8 @@ is a great boon to your coding process. To get ready to work on the codebase, please do the following: 1. Fork & clone the repository -2. Run `npm install`, or `npm install --no-optional` if you're not working on voice -3. Code your heart out! -4. Run `npm test` to run ESLint -5. Run `npm run docs` to build any documentation changes +2. Run `npm install` +3. If you're working on voice, also run `npm install node-opus` or `npm install opusscript` +4. Code your heart out! +5. Run `npm test` to run ESLint and ensure any JSDoc changes are valid 6. [Submit a pull request](https://github.com/hydrabolt/discord.js/compare) diff --git a/README.md b/README.md index 032245e0b..61920075e 100644 --- a/README.md +++ b/README.md @@ -47,15 +47,20 @@ A bot template using discord.js can be generated using [generator-discordbot](ht ## Links * [Website](http://hydrabolt.github.io/discord.js/) -* [Discord.js Server](https://discord.gg/bRCvFy9) -* [Discord API Server](https://discord.gg/rV4BwdK) +* [Discord.js server](https://discord.gg/bRCvFy9) +* [Discord API server](https://discord.gg/rV4BwdK) * [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master) -* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html) +* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html) +* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples) * [GitHub](https://github.com/hydrabolt/discord.js) * [NPM](https://www.npmjs.com/package/discord.js) -* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples) -* [Related Libraries](https://discordapi.com/unofficial/libs.html) +* [Related libraries](https://discordapi.com/unofficial/libs.html) -## Contact -Before reporting an issue, please read the [documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master). -If you can't find help there, you can ask in the official [Discord.js Server](https://discord.gg/bRCvFy9). +## Contributing +Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the +[documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master). +See [the contributing guide](CONTRIBUTING.md) if you'd like to submit a PR. + +## Help +If you don't understand something in this documentation, you are experiencing problems, or you just need a gentle +nudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9). diff --git a/docs/custom/documents/welcome.md b/docs/custom/documents/welcome.md index f51e3c512..bd3251f37 100644 --- a/docs/custom/documents/welcome.md +++ b/docs/custom/documents/welcome.md @@ -35,14 +35,14 @@ For production bots, using node-opus should be considered a necessity, especiall ## Links * [Website](http://hydrabolt.github.io/discord.js/) -* [Discord.js Server](https://discord.gg/bRCvFy9) -* [Discord API Server](https://discord.gg/rV4BwdK) +* [Discord.js server](https://discord.gg/bRCvFy9) +* [Discord API server](https://discord.gg/rV4BwdK) * [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master) -* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html) +* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html) +* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples) * [GitHub](https://github.com/hydrabolt/discord.js) * [NPM](https://www.npmjs.com/package/discord.js) -* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples) -* [Related Libraries](https://discordapi.com/unofficial/libs.html) +* [Related libraries](https://discordapi.com/unofficial/libs.html) ## Help If you don't understand something in this documentation, you are experiencing problems, or you just need a gentle diff --git a/docs/docs.json b/docs/docs.json index 9e8c638bf..623f70bc4 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476422023473},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js Server](https://discord.gg/bRCvFy9)\r\n* [Discord API Server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy Documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [Related Libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476422807764},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file From a6ca05b379f19e1832cd2ddd3065393b7b7a8934 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 01:27:54 -0400 Subject: [PATCH 41/62] Change a word in help --- README.md | 2 +- docs/custom/documents/welcome.md | 2 +- docs/docs.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 61920075e..d8154b7be 100644 --- a/README.md +++ b/README.md @@ -62,5 +62,5 @@ Before creating an issue, please ensure that it hasn't already been reported/sug See [the contributing guide](CONTRIBUTING.md) if you'd like to submit a PR. ## Help -If you don't understand something in this documentation, you are experiencing problems, or you just need a gentle +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9). diff --git a/docs/custom/documents/welcome.md b/docs/custom/documents/welcome.md index bd3251f37..36c57d6cc 100644 --- a/docs/custom/documents/welcome.md +++ b/docs/custom/documents/welcome.md @@ -45,5 +45,5 @@ For production bots, using node-opus should be considered a necessity, especiall * [Related libraries](https://discordapi.com/unofficial/libs.html) ## Help -If you don't understand something in this documentation, you are experiencing problems, or you just need a gentle +If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9). diff --git a/docs/docs.json b/docs/docs.json index 623f70bc4..fea3ae05c 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476422807764},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in this documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476422865654},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file From 6e76df26568bb4b4d982b3d059ab3d79ded6c639 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 01:45:02 -0400 Subject: [PATCH 42/62] Update legacy docs link --- README.md | 2 +- docs/custom/documents/welcome.md | 2 +- docs/docs.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d8154b7be..20c73fb01 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ A bot template using discord.js can be generated using [generator-discordbot](ht * [Discord.js server](https://discord.gg/bRCvFy9) * [Discord API server](https://discord.gg/rV4BwdK) * [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master) -* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html) +* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html) * [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples) * [GitHub](https://github.com/hydrabolt/discord.js) * [NPM](https://www.npmjs.com/package/discord.js) diff --git a/docs/custom/documents/welcome.md b/docs/custom/documents/welcome.md index 36c57d6cc..dccf80bbd 100644 --- a/docs/custom/documents/welcome.md +++ b/docs/custom/documents/welcome.md @@ -38,7 +38,7 @@ For production bots, using node-opus should be considered a necessity, especiall * [Discord.js server](https://discord.gg/bRCvFy9) * [Discord API server](https://discord.gg/rV4BwdK) * [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master) -* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html) +* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html) * [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples) * [GitHub](https://github.com/hydrabolt/discord.js) * [NPM](https://www.npmjs.com/package/discord.js) diff --git a/docs/docs.json b/docs/docs.json index fea3ae05c..9cda5e5d3 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476422865654},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.1.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476423882221},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file From e4636243b222166d27e2c5d361f1821d2a6ea143 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 02:11:31 -0400 Subject: [PATCH 43/62] Improve token "Bot" removal --- src/client/rest/RESTMethods.js | 2 +- src/sharding/ShardingManager.js | 2 +- src/util/GetRecommendedShards.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 8cbd40b2b..85c4c698d 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -15,7 +15,7 @@ class RESTMethods { } loginToken(token = this.rest.client.token) { - token = token.replace('Bot ', ''); + token = token.replace(/^Bot /, ''); return new Promise((resolve, reject) => { this.rest.client.manager.connectToWebSocket(token, resolve, reject); }); diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 2d770472d..640822455 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -72,7 +72,7 @@ class ShardingManager extends EventEmitter { * Token to use for obtaining the automatic shard count, and passing to shards * @type {?string} */ - this.token = options.token; + this.token = options.token ? options.token.replace(/^Bot /, '') : null; /** * A collection of shards that this manager has spawned diff --git a/src/util/GetRecommendedShards.js b/src/util/GetRecommendedShards.js index 050740218..abce3fb39 100644 --- a/src/util/GetRecommendedShards.js +++ b/src/util/GetRecommendedShards.js @@ -10,7 +10,7 @@ module.exports = function getRecommendedShards(token) { return new Promise((resolve, reject) => { if (!token) throw new Error('A token must be provided.'); superagent.get(botGateway) - .set('Authorization', `Bot ${token.replace('Bot ', '')}`) + .set('Authorization', `Bot ${token.replace(/^Bot /, '')}`) .end((err, res) => { if (err) reject(err); resolve(res.body.shards); From 8f0e2e0c56c9ab2c7c93d0aa1039dfceaa93dad2 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 14 Oct 2016 02:14:00 -0400 Subject: [PATCH 44/62] Make token "Bot" removal more lenient In case of heavy user error. :) --- src/client/rest/RESTMethods.js | 2 +- src/sharding/ShardingManager.js | 2 +- src/util/GetRecommendedShards.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 85c4c698d..3bbe155dd 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -15,7 +15,7 @@ class RESTMethods { } loginToken(token = this.rest.client.token) { - token = token.replace(/^Bot /, ''); + token = token.replace(/^Bot\s*/i, ''); return new Promise((resolve, reject) => { this.rest.client.manager.connectToWebSocket(token, resolve, reject); }); diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 640822455..911fa47b7 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -72,7 +72,7 @@ class ShardingManager extends EventEmitter { * Token to use for obtaining the automatic shard count, and passing to shards * @type {?string} */ - this.token = options.token ? options.token.replace(/^Bot /, '') : null; + this.token = options.token ? options.token.replace(/^Bot\s*/i, '') : null; /** * A collection of shards that this manager has spawned diff --git a/src/util/GetRecommendedShards.js b/src/util/GetRecommendedShards.js index abce3fb39..8165cd02f 100644 --- a/src/util/GetRecommendedShards.js +++ b/src/util/GetRecommendedShards.js @@ -10,7 +10,7 @@ module.exports = function getRecommendedShards(token) { return new Promise((resolve, reject) => { if (!token) throw new Error('A token must be provided.'); superagent.get(botGateway) - .set('Authorization', `Bot ${token.replace(/^Bot /, '')}`) + .set('Authorization', `Bot ${token.replace(/^Bot\s*/i, '')}`) .end((err, res) => { if (err) reject(err); resolve(res.body.shards); From 50a1d1cbef021eca01cdc5c180a4f34360354c54 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Fri, 14 Oct 2016 17:58:48 -0500 Subject: [PATCH 45/62] Add VoiceChannel.joinable/speakable (#802) * add some getters to voice channels * Update VoiceChannel.js * Update VoiceChannel.js * Update VoiceChannel.js --- docs/docs.json | 2 +- src/structures/VoiceChannel.js | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 9cda5e5d3..b38e9c5a4 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476423882221},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476485253510},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":90,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":98,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/VoiceChannel.js b/src/structures/VoiceChannel.js index 3fd6b8090..2bc565d8b 100644 --- a/src/structures/VoiceChannel.js +++ b/src/structures/VoiceChannel.js @@ -45,6 +45,22 @@ class VoiceChannel extends GuildChannel { return null; } + /** + * Checks if the client has permission join the voice channel + * @type {boolean} + */ + get joinable() { + return this.permissionsFor(this.client.user).hasPermission('CONNECT'); + } + + /** + * Checks if the client has permission to send audio to the voice channel + * @type {boolean} + */ + get speakable() { + return this.permissionsFor(this.client.user).hasPermission('SPEAK'); + } + /** * Sets the bitrate of the channel * @param {number} bitrate The new bitrate From fe2192d544939c1785cd3e2f361136beab78a56c Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 15 Oct 2016 00:12:37 -0400 Subject: [PATCH 46/62] Thanks for overriding the MessageOptions typedef, Gus :unamused: --- docs/docs.json | 2 +- src/structures/Webhook.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index b38e9c5a4..e9f1505f3 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476485253510},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.array()[0];\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":58,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":71,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":81,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":90,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":98,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476504733906},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 0e94e8ff6..4517eb8bd 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -67,7 +67,7 @@ class Webhook { /** * Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode - * @typedef {Object} MessageOptions + * @typedef {Object} WebhookMessageOptions * @property {boolean} [tts=false] Whether or not the message should be spoken aloud * @property {boolean} [disableEveryone=this.options.disableEveryone] Whether or not @everyone and @here * should be replaced with plain-text @@ -76,7 +76,7 @@ class Webhook { /** * Send a message with this webhook * @param {StringResolvable} content The content to send. - * @param {MessageOptions} [options={}] The options to provide. + * @param {WebhookMessageOptions} [options={}] The options to provide. * @returns {Promise} * @example * // send a message @@ -112,7 +112,7 @@ class Webhook { /** * Send a text-to-speech message with this webhook * @param {StringResolvable} content The content to send - * @param {MessageOptions} [options={}] The options to provide + * @param {WebhookMessageOptions} [options={}] The options to provide * @returns {Promise} * @example * // send a TTS message @@ -130,7 +130,7 @@ class Webhook { * @param {FileResolvable} attachment The file to send * @param {string} [fileName="file.jpg"] The name and extension of the file * @param {StringResolvable} [content] Text message to send with the attachment - * @param {MessageOptions} [options] The options to provide + * @param {WebhookMessageOptions} [options] The options to provide * @returns {Promise} */ sendFile(attachment, fileName, content, options = {}) { @@ -157,7 +157,7 @@ class Webhook { * Send a code block with this webhook * @param {string} lang Language for the code block * @param {StringResolvable} content Content of the code block - * @param {MessageOptions} options The options to provide + * @param {WebhookMessageOptions} options The options to provide * @returns {Promise} */ sendCode(lang, content, options = {}) { From 6baf43dc24396b28a7017fa727266d574cf736e1 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 15 Oct 2016 01:20:31 -0400 Subject: [PATCH 47/62] Add Collection.filterArray --- src/util/Collection.js | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/util/Collection.js b/src/util/Collection.js index b70cec32f..53299023a 100644 --- a/src/util/Collection.js +++ b/src/util/Collection.js @@ -205,11 +205,27 @@ class Collection extends Map { */ filter(fn, thisArg) { if (thisArg) fn = fn.bind(thisArg); - const collection = new Collection(); + const results = new Collection(); for (const [key, val] of this) { - if (fn(val, key, this)) collection.set(key, val); + if (fn(val, key, this)) results.set(key, val); } - return collection; + return results; + } + + /** + * Identical to + * [Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter). + * @param {function} fn Function used to test (should return a boolean) + * @param {Object} [thisArg] Value to use as `this` when executing function + * @returns {Collection} + */ + filterArray(fn, thisArg) { + if (thisArg) fn = fn.bind(thisArg); + const results = []; + for (const [key, val] of this) { + if (fn(val, key, this)) results.push(val); + } + return results; } /** From f2555132fee92b3e9716b98a5cea0440d13af149 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 15 Oct 2016 01:29:46 -0400 Subject: [PATCH 48/62] Simplify sendCode lang --- src/structures/Message.js | 2 +- src/structures/Webhook.js | 2 +- src/structures/interface/TextBasedChannel.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index 31afb2b1d..ca42645b6 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -334,7 +334,7 @@ class Message { */ editCode(lang, content) { content = escapeMarkdown(this.client.resolver.resolveString(content), true); - return this.edit(`\`\`\`${lang ? lang : ''}\n${content}\n\`\`\``); + return this.edit(`\`\`\`${lang || ''}\n${content}\n\`\`\``); } /** diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 4517eb8bd..9367bc54e 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -167,7 +167,7 @@ class Webhook { if (!options.split.append) options.split.append = '\n```'; } content = escapeMarkdown(this.client.resolver.resolveString(content), true); - return this.sendMessage(`\`\`\`${lang ? lang : ''}\n${content}\n\`\`\``, options); + return this.sendMessage(`\`\`\`${lang || ''}\n${content}\n\`\`\``, options); } /** diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index a772d1590..bba561a74 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -116,7 +116,7 @@ class TextBasedChannel { if (!options.split.append) options.split.append = '\n```'; } content = escapeMarkdown(this.client.resolver.resolveString(content), true); - return this.sendMessage(`\`\`\`${lang ? lang : ''}\n${content}\n\`\`\``, options); + return this.sendMessage(`\`\`\`${lang || ''}\n${content}\n\`\`\``, options); } /** From 7e0f98ec68bed53fc745970a34d99d8671ea760d Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 15 Oct 2016 01:45:13 -0400 Subject: [PATCH 49/62] MOAR SIMPLIFICATION --- src/structures/Webhook.js | 2 +- src/structures/interface/TextBasedChannel.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js index 9367bc54e..2661b896d 100644 --- a/src/structures/Webhook.js +++ b/src/structures/Webhook.js @@ -163,7 +163,7 @@ class Webhook { sendCode(lang, content, options = {}) { if (options.split) { if (typeof options.split !== 'object') options.split = {}; - if (!options.split.prepend) options.split.prepend = `\`\`\`${lang ? lang : ''}\n`; + if (!options.split.prepend) options.split.prepend = `\`\`\`${lang || ''}\n`; if (!options.split.append) options.split.append = '\n```'; } content = escapeMarkdown(this.client.resolver.resolveString(content), true); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index bba561a74..72dcbacf3 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -112,7 +112,7 @@ class TextBasedChannel { sendCode(lang, content, options = {}) { if (options.split) { if (typeof options.split !== 'object') options.split = {}; - if (!options.split.prepend) options.split.prepend = `\`\`\`${lang ? lang : ''}\n`; + if (!options.split.prepend) options.split.prepend = `\`\`\`${lang || ''}\n`; if (!options.split.append) options.split.append = '\n```'; } content = escapeMarkdown(this.client.resolver.resolveString(content), true); From 0b5ef296cb475de52b24fb0d63e2446ce9c5e862 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 15 Oct 2016 20:23:32 -0400 Subject: [PATCH 50/62] Fix split messages resolving with multiple of the same message --- src/client/rest/RESTMethods.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 3bbe155dd..e885ac50b 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -68,8 +68,7 @@ class RESTMethods { if (channel instanceof User || channel instanceof GuildMember) { this.createDM(channel).then(chan => { this._sendMessageRequest(chan, content, file, tts, nonce, resolve, reject); - }) - .catch(reject); + }).catch(reject); } else { this._sendMessageRequest(channel, content, file, tts, nonce, resolve, reject); } @@ -79,22 +78,24 @@ class RESTMethods { _sendMessageRequest(channel, content, file, tts, nonce, resolve, reject) { if (content instanceof Array) { const datas = []; - const promise = this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, { + let promise = this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, { content: content[0], tts, nonce, }, file).catch(reject); + for (let i = 1; i <= content.length; i++) { if (i < content.length) { - promise.then(data => { + const i2 = i; + promise = promise.then(data => { datas.push(data); return this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, { - content: content[i], tts, nonce, + content: content[i2], tts, nonce, }, file); - }); + }).catch(reject); } else { promise.then(data => { datas.push(data); resolve(this.rest.client.actions.MessageCreate.handle(datas).messages); - }); + }).catch(reject); } } } else { From 13aae621b86726f763ae3c689273f973b95b31e7 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 16 Oct 2016 20:58:03 -0400 Subject: [PATCH 51/62] Fix Hyper's error and make it more useful --- src/client/websocket/WebSocketManager.js | 3 ++- src/util/Constants.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index bc22249d2..7e7a03b92 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -265,7 +265,8 @@ class WebSocketManager extends EventEmitter { if (this.client.options.fetchAllMembers) { const promises = this.client.guilds.array().map(g => g.fetchMembers()); Promise.all(promises).then(() => this._emitReady()).catch(e => { - this.client.emit(Constants.Event.WARN, `Error on pre-ready guild member fetching - ${e}`); + this.client.emit(Constants.Events.WARN, 'Error in pre-ready guild member fetching'); + this.client.emit(Constants.Events.ERROR, e); this._emitReady(); }); return; diff --git a/src/util/Constants.js b/src/util/Constants.js index e6a33d7d1..b190b53cc 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -190,6 +190,7 @@ exports.Events = { TYPING_STOP: 'typingStop', DISCONNECT: 'disconnect', RECONNECTING: 'reconnecting', + ERROR: 'error', WARN: 'warn', DEBUG: 'debug', }; From fc307fab8a61aef7e668e4f5206d10d43d2c9102 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sun, 16 Oct 2016 21:14:59 -0400 Subject: [PATCH 52/62] Remove unnecessary array conversions --- docs/docs.json | 2 +- src/client/Client.js | 6 +++--- src/client/websocket/WebSocketManager.js | 2 +- src/structures/Emoji.js | 2 +- src/structures/GroupDMChannel.js | 4 ++-- src/structures/interface/TextBasedChannel.js | 5 +++-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index e9f1505f3..7a132cb55 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476504733906},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":285,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.array()[0];\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":237,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":252,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":267,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":279,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":293,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476666874061},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.first();\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file diff --git a/src/client/Client.js b/src/client/Client.js index 652c11f16..58e7f595f 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -251,13 +251,13 @@ class Client extends EventEmitter { /** * This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however * if you wish to force a sync of Guild data, you can use this. Only applicable to user accounts. - * @param {Guild[]} [guilds=this.guilds.array()] An array of guilds to sync + * @param {Guild[]|Collection} [guilds=this.guilds] An array or collection of guilds to sync */ - syncGuilds(guilds = this.guilds.array()) { + syncGuilds(guilds = this.guilds) { if (!this.user.bot) { this.ws.send({ op: 12, - d: guilds.map(g => g.id), + d: guilds instanceof Collection ? guilds.keyArray() : guilds.map(g => g.id), }); } } diff --git a/src/client/websocket/WebSocketManager.js b/src/client/websocket/WebSocketManager.js index 7e7a03b92..8f7110613 100644 --- a/src/client/websocket/WebSocketManager.js +++ b/src/client/websocket/WebSocketManager.js @@ -263,7 +263,7 @@ class WebSocketManager extends EventEmitter { if (unavailableCount === 0) { this.status = Constants.Status.NEARLY; if (this.client.options.fetchAllMembers) { - const promises = this.client.guilds.array().map(g => g.fetchMembers()); + const promises = this.client.guilds.map(g => g.fetchMembers()); Promise.all(promises).then(() => this._emitReady()).catch(e => { this.client.emit(Constants.Events.WARN, 'Error in pre-ready guild member fetching'); this.client.emit(Constants.Events.ERROR, e); diff --git a/src/structures/Emoji.js b/src/structures/Emoji.js index a4b8c1ce4..0349b6f70 100644 --- a/src/structures/Emoji.js +++ b/src/structures/Emoji.js @@ -95,7 +95,7 @@ class Emoji { * @returns {string} * @example * // send an emoji: - * const emoji = guild.emojis.array()[0]; + * const emoji = guild.emojis.first(); * msg.reply(`Hello! ${emoji}`); */ toString() { diff --git a/src/structures/GroupDMChannel.js b/src/structures/GroupDMChannel.js index d37baa6bf..cfeea2555 100644 --- a/src/structures/GroupDMChannel.js +++ b/src/structures/GroupDMChannel.js @@ -101,8 +101,8 @@ class GroupDMChannel extends Channel { this.ownerID === channel.ownerID; if (equal) { - const thisIDs = this.recipients.array().map(r => r.id); - const otherIDs = channel.recipients.map(r => r.id); + const thisIDs = this.recipients.keyArray(); + const otherIDs = channel.recipients.keyArray(); return arraysEqual(thisIDs, otherIDs); } diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 72dcbacf3..406948701 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -316,8 +316,9 @@ class TextBasedChannel { * @returns {Collection} */ bulkDelete(messages) { - if (messages instanceof Collection) messages = messages.array(); - if (!(messages instanceof Array)) return Promise.reject(new TypeError('Messages must be an Array or Collection.')); + if (!(messages instanceof Array || messages instanceof Collection)) { + return Promise.reject(new TypeError('Messages must be an Array or Collection.')); + } const messageIDs = messages.map(m => m.id); return this.client.rest.methods.bulkDeleteMessages(this, messageIDs); } From e04dbbdb827970cb842918131cfe6a44f6d17683 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Sun, 16 Oct 2016 20:28:17 -0500 Subject: [PATCH 53/62] add clientuser#friends (#807) * add client#friends * Update Ready.js * Update Client.js * move friends to client.user * Update ClientUser.js * Update ClientUser.js --- docs/docs.json | 2 +- src/client/websocket/packets/handlers/Ready.js | 5 +++++ src/structures/ClientUser.js | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 7a132cb55..c3893e779 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476666874061},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\rmuch better to use a bot account rather than a user account.\rBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\rthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\rconst token = 'my token';\rclient.login(token);","// log the client in using email and password\rconst email = 'user@email.com';\rconst password = 'supersecret123';\rclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\rprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\rIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\rwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\rThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\rcan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r // you can play a file or a stream here:\r connection.playFile('./file.mp3').then(dispatcher => {\r\r });\r});\r```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\raren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r const receiver = connection.createReceiver();\r});\r```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\rThis avoids you having to create a new receiver.\rAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\rstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\rstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\rhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\r```js\r// obtained using:\rvoiceChannel.join().then(connection => {\r\r});\r```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\rconst ytdl = require('ytdl-core');\rconst streamOptions = { seek: 0, volume: 1 };\rvoiceChannel.join()\r .then(connection => {\r const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\r const dispatcher = connection.playStream(stream, streamOptions);\r })\r .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\r console.log(`${count} guilds in shard ${shard.id}`);\r}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\rfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\rIf you do not select an amount of shards, the manager will automatically decide the best amount.\rThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\r console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\r}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":7,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\rChanging usernames in Discord is heavily rate limited, with only 2 requests\revery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\rclient.user.setUsername('discordjs')\r .then(user => console.log(`My new username is ${user.username}`))\r .catch(console.error);"],"meta":{"line":42,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\remail here.","memberof":"ClientUser","examples":["// set email\rclient.user.setEmail('bob@gmail.com')\r .then(user => console.log(`My new email is ${user.email}`))\r .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password123')\r .then(user => console.log('New password set!'))\r .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .catch(console.error);"],"meta":{"line":86,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":95,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":105,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":117,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":126,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":15,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\rDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"DMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\rconst emoji = guild.emojis.first();\rmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\rcan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\rit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\rwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\rconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\rconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\rIt's recommended to see if a guild is available before performing operations or reading data from it. You can\rcheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\rconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\rthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\rguild.edit({\r name: 'Discord Guild',\r region: 'london',\r})\r.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\r.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\rguild.setName('Discord Guild')\r .then(updated => console.log(`Updated guild name to ${guild.name}`))\r .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\rguild.setRegion('london')\r .then(updated => console.log(`Updated guild region to ${guild.region}`))\r .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\rguild.setVerificationLevel(1)\r .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\r .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKChannel(channel)\r .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\r .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\rguild.setAFKTimeout(60)\r .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\r .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\rguild.setIcon(fs.readFileSync('./icon.png'))\r .then(updated => console.log('Updated the guild icon'))\r .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\rguild.setOwner(guilds.members[0])\r .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\r .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\rguild.setIcon(fs.readFileSync('./splash.png'))\r .then(updated => console.log('Updated the guild splash'))\r .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\rguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\rguild.unban('123123123123')\r .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\r .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\rguild.pruneMembers(12, true)\r .then(pruned => console.log(`This will prune ${pruned} people!`);\r .catch(console.error);","// actually prune the members\rguild.pruneMembers(12)\r .then(pruned => console.log(`I just pruned ${pruned} people!`);\r .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\rguild.createChannel('new-general', 'text')\r .then(channel => console.log(`Created new channel ${channel}`))\r .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\rguild.createRole()\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error);","// create a new role with data\rguild.createRole({ name: 'Super Cool People' })\r .then(role => console.log(`Created role ${role}`))\r .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\rguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);","// create a new emoji from a file on your computer\rguild.createEmoji('./memes/banana.png', 'banana')\r .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\r .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\rguild.delete()\r .then(g => console.log(`Deleted the guild ${g}`))\r .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\rit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\rwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\rconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\rconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\rchannel.delete()\r .then() // success\r .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\r* `dm` - a DM channel\r* `group` - a Group DM channel\r* `text` - a guild text channel\r* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\rguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\ralso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\rThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\rconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\runknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\rIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\rthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\rmessage.edit('This is my new content!')\r .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\rmessage.delete()\r .then(msg => console.log(`Deleted message from ${msg.author}`))\r .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\rmessage.reply('Hey, I'm a reply!')\r .then(msg => console.log(`Sent a reply to ${msg.author}`))\r .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\rwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\rmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\rconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\rwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\rmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\rthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\rSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\rwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\rduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\rlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\rended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\r\r* **`online`** - user is online\r* **`offline`** - user is offline or invisible\r* **`idle`** - user is AFK\r* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\rconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\rif (role.hasPermission('BAN_MEMBERS')) {\r console.log('This role can ban members');\r} else {\r console.log('This role can\\'t ban members');\r}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\rrole.edit({name: 'new role'})\r .then(r => console.log(`Edited role ${r}`))\r .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\rrole.setName('new role')\r .then(r => console.log(`Edited name of role ${r}`))\r .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\rrole.setColor('#FF0000')\r .then(r => console.log(`Set color of role ${r}`))\r .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\rrole.setHoist(true)\r .then(r => console.log(`Role hoisted: ${r.hoist}`))\r .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\rrole.setPosition(1)\r .then(r => console.log(`Role position: ${r.position}`))\r .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\rrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\rrole.setMentionable(true)\r .then(r => console.log(`Role updated ${r}`))\r .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\rrole.delete()\r .then(r => console.log(`Deleted role ${r}`))\r .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\rit is advisable to just compare `role.id === role2.id` as it is much faster and is often\rwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\r .then(webhook => console.log(`Created Webhook ${webhook}`))\r .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\rIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\rvoiceChannel.join()\r .then(connection => console.log('Connected!'))\r .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\rvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\roverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\rmessage.channel.overwritePermissions(message.author, {\r SEND_MESSAGES: false\r})\r.then(() => console.log('Done!'))\r.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\rchannel.setName('not_general')\r .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\r .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\rchannel.setPosition(2)\r .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\r .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\rchannel.setTopic('needs more rate limiting')\r .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\r .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\rIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\rconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\rconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\rwebhook.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\rwebhook.sendSlackMessage({\r 'username': 'Wumpus',\r 'attachments': [{\r 'pretext': 'this looks pretty cool',\r 'color': '#F0F',\r 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\r 'footer': 'Powered by sneks',\r 'ts': new Date().getTime() / 1000\r }]\r}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\rwebhook.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\rreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\rArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\rsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\rsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\rIn the latter case, this is identical to\r[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\r console.log('user here!');\r}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\rbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\r[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\r[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\r[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\r[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\r[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\rchannel.sendMessage('hello!')\r .then(message => console.log(`Sent message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\rchannel.sendTTSMessage('hello!')\r .then(message => console.log(`Sent tts message: ${message.content}`))\r .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\rchannel.fetchMessage('99539446449315840')\r .then(message => console.log(message.content))\r .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\rchannel.fetchMessages({limit: 10})\r .then(messages => console.log(`Received ${messages.size} messages`))\r .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\rchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\rThe indicator will only stop if this is called as many times as startTyping().\rIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\rchannel.stopTyping();","// force typing to fully stop in a channel\rchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\rconst collector = channel.createCollector(\r m => m.content.includes('discord'),\r { time: 15000 }\r);\rcollector.on('message', m => console.log(`Collected ${m.content}`));\rcollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\rfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\rconst filter = m => m.content.startsWith('!vote');\r// errors: ['time'] treats ending because of the time limit as an error\rchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\r .then(collected => console.log(collected.size))\r .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\rOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\r* A User object\r* A User ID\r* A Message (resolves to the message author)\r* A Guild (owner of the guild)\r* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\r* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\r* A GuildMember object\r* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\r* An instance of a Channel\r* An instance of a Message (the channel the message was sent in)\r* An instance of a Guild (the #general channel)\r* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\r* An invite code\r* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\r* A string\r* A permission number\r\rPossible strings:\r```js\r[\r \"CREATE_INSTANT_INVITE\",\r \"KICK_MEMBERS\",\r \"BAN_MEMBERS\",\r \"ADMINISTRATOR\",\r \"MANAGE_CHANNELS\",\r \"MANAGE_GUILD\",\r \"READ_MESSAGES\",\r \"SEND_MESSAGES\",\r \"SEND_TTS_MESSAGES\",\r \"MANAGE_MESSAGES\",\r \"EMBED_LINKS\",\r \"ATTACH_FILES\",\r \"READ_MESSAGE_HISTORY\",\r \"MENTION_EVERYONE\",\r \"EXTERNAL_EMOJIS\", // use external emojis\r \"CONNECT\", // connect to voice\r \"SPEAK\", // speak on voice\r \"MUTE_MEMBERS\", // globally mute members on voice\r \"DEAFEN_MEMBERS\", // globally deafen members on voice\r \"MOVE_MEMBERS\", // move member's voice channels\r \"USE_VAD\", // use voice activity detection\r \"CHANGE_NICKNAME\",\r \"MANAGE_NICKNAMES\", // change nicknames of others\r \"MANAGE_ROLES_OR_PERMISSIONS\"\r]\r```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\r* A string\r* An Array (joined with a new line delimiter to give a string)\r* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\r* A Buffer\r* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\r* A Buffer\r* The path to a local file\r* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\r```js\r{\r 'SEND_MESSAGES': true,\r 'ATTACH_FILES': false,\r}\r```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\rit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\r```js\rfunction(message, collector) {\r if (message.content.includes('discord')) {\r return true; // passed the filter test\r }\r return false; // failed the filter test\r}\r```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\rshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\rthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\r(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\r(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\rthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\rupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\rcorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\rprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\rlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\r\nThese are just questions that get asked frequently, that usually have a common resolution.\r\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\r\nAlways make sure to read the documentation.\r\n\r\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\r\nUpdate to Node.js 6.0.0 or newer.\r\n\r\n## I get an absurd amount of errors when installing discord.js on Windows‽\r\nThe installation still worked fine, just without `node-opus`.\r\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\r\n\r\n## How do I get voice working?\r\n- Install FFMPEG.\r\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\r\n\r\n## How do I install FFMPEG?\r\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\r\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\r\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\r\n\r\n## How do I set up node-opus?\r\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\r\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\r\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\r\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"ping\",\r\n if (message.content === 'ping') {\r\n // send \"pong\" to the same channel.\r\n message.channel.sendMessage('pong');\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\r\n Send a user a link to their avatar\r\n*/\r\n\r\n// import the discord.js module\r\nconst Discord = require('discord.js');\r\n\r\n// create an instance of a Discord Client, and call it bot\r\nconst bot = new Discord.Client();\r\n\r\n// the token of your bot - https://discordapp.com/developers/applications/me\r\nconst token = 'your bot token here';\r\n\r\n// the ready event is vital, it means that your bot will only start reacting to information\r\n// from Discord _after_ ready is emitted.\r\nbot.on('ready', () => {\r\n console.log('I am ready!');\r\n});\r\n\r\n// create an event listener for messages\r\nbot.on('message', message => {\r\n // if the message is \"what is my avatar\",\r\n if (message.content === 'what is my avatar') {\r\n // send the user's avatar URL\r\n message.reply(message.author.avatarURL);\r\n }\r\n});\r\n\r\n// log our bot in\r\nbot.login(token);\r\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476667009223},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":50,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":65,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":80,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":94,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":103,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":113,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":125,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":134,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index b6f3e1e1d..eceb36103 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -16,6 +16,11 @@ class ReadyHandler extends AbstractHandler { for (const guild of data.guilds) client.dataManager.newGuild(guild); for (const privateDM of data.private_channels) client.dataManager.newChannel(privateDM); + for (const relation of data.relationships) { + const friend = client.dataManager.newUser(relation.user); + client.user.friends.set(friend.id, friend); + } + data.presences = data.presences || []; for (const presence of data.presences) { client.dataManager.newUser(presence.user); diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 24b36bb42..cf6fee66b 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -1,4 +1,5 @@ const User = require('./User'); +const Collection = require('../util/Collection'); /** * Represents the logged in client's Discord User @@ -21,6 +22,13 @@ class ClientUser extends User { this.email = data.email; this.localPresence = {}; this._typing = new Map(); + + /** + * A Collection of friends for the logged in user. + * This is only filled for user accounts, not bot accounts! + * @type {Collection} + */ + this.friends = new Collection(); } edit(data) { From 62b93659e626f04a96f751bc7ebb729ba0c13499 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Mon, 17 Oct 2016 00:02:48 -0400 Subject: [PATCH 54/62] Clean up and simplify some code --- src/structures/EvaluatedPermissions.js | 2 +- src/structures/GuildChannel.js | 8 ++++---- src/structures/GuildMember.js | 2 +- src/structures/Role.js | 2 +- src/structures/interface/TextBasedChannel.js | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/structures/EvaluatedPermissions.js b/src/structures/EvaluatedPermissions.js index a4462692a..de92c10d7 100644 --- a/src/structures/EvaluatedPermissions.js +++ b/src/structures/EvaluatedPermissions.js @@ -50,7 +50,7 @@ class EvaluatedPermissions { * @returns {boolean} */ hasPermissions(permissions, explicit = false) { - return permissions.map(p => this.hasPermission(p, explicit)).every(v => v); + return permissions.every(p => this.hasPermission(p, explicit)); } /** diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index 3eb97a4f6..de1cd2726 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -239,12 +239,12 @@ class GuildChannel extends Channel { this.name === channel.name; if (equal) { - if (channel.permission_overwrites) { - const thisIDSet = Array.from(this.permissionOverwrites.keys()); - const otherIDSet = channel.permission_overwrites.map(overwrite => overwrite.id); + if (this.permissionOverwrites && channel.permissionOverwrites) { + const thisIDSet = this.permissionOverwrites.keyArray(); + const otherIDSet = channel.permissionOverwrites.keyArray(); equal = arraysEqual(thisIDSet, otherIDSet); } else { - equal = false; + equal = !this.permissionOverwrites && !channel.permissionOverwrites; } } diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index c296aaab4..71472c002 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -248,7 +248,7 @@ class GuildMember { */ hasPermissions(permissions, explicit = false) { if (!explicit && this.user.id === this.guild.ownerID) return true; - return permissions.map(p => this.hasPermission(p, explicit)).every(v => v); + return permissions.every(p => this.hasPermission(p, explicit)); } /** diff --git a/src/structures/Role.js b/src/structures/Role.js index 2c884c26c..f2a52ac87 100644 --- a/src/structures/Role.js +++ b/src/structures/Role.js @@ -150,7 +150,7 @@ class Role { * @returns {boolean} */ hasPermissions(permissions, explicit = false) { - return permissions.map(p => this.hasPermission(p, explicit)).every(v => v); + return permissions.every(p => this.hasPermission(p, explicit)); } /** diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 406948701..5687828bb 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -319,7 +319,7 @@ class TextBasedChannel { if (!(messages instanceof Array || messages instanceof Collection)) { return Promise.reject(new TypeError('Messages must be an Array or Collection.')); } - const messageIDs = messages.map(m => m.id); + const messageIDs = messages instanceof Collection ? messages.keyArray() : messages.map(m => m.id); return this.client.rest.methods.bulkDeleteMessages(this, messageIDs); } From bd5540314b8a2247f755718b09f3872e1a79321e Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Mon, 17 Oct 2016 21:24:16 -0500 Subject: [PATCH 55/62] add message@#type --- docs/docs.json | 2 +- src/structures/Message.js | 6 ++++++ src/util/Constants.js | 10 ++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index c3893e779..0f1d4cacb 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476667009223},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":50,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":65,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":80,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":94,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":103,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":113,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":125,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":134,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":310,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":325,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":335,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":344,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":352,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":366,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":387,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":408,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":437,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":52,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":95,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":112,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":203,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":212,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":221,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":231,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":270,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":279,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":288,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":299,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476757431844},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":50,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":65,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":80,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":94,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":103,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":113,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":125,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":134,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/structures/Message.js b/src/structures/Message.js index ca42645b6..6b0ae77c3 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -32,6 +32,12 @@ class Message { */ this.id = data.id; + /** + * The type of the message + * @type {string} + */ + this.type = Constants.MessageTypes[data.type]; + /** * The content of the message * @type {string} diff --git a/src/util/Constants.js b/src/util/Constants.js index b190b53cc..d8d326a5e 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -227,6 +227,16 @@ exports.WSEvents = { VOICE_SERVER_UPDATE: 'VOICE_SERVER_UPDATE', }; +exports.MessageTypes = { + 0: 'DEFAULT', + 1: 'RECIPIENT_ADD', + 2: 'RECIPIENT_REMOVE', + 3: 'CALL', + 4: 'CHANNEL_NAME_CHANGE', + 5: 'CHANNEL_ICON_CHANGE', + 6: 'PINS_ADD', +}; + const PermissionFlags = exports.PermissionFlags = { CREATE_INSTANT_INVITE: 1 << 0, KICK_MEMBERS: 1 << 1, From 9c8eb2dfc3e72dc9c6ffd5edb71d02426c1738b9 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Tue, 18 Oct 2016 00:36:25 -0500 Subject: [PATCH 56/62] lets all be friendly! (#809) * lets all be friendly! * fix doc * Update ClientUser.js * Update ClientUser.js --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 20 ++++++++++++++++++++ src/structures/ClientUser.js | 22 ++++++++++++++++++++++ src/util/Constants.js | 1 + 4 files changed, 44 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 0f1d4cacb..7debed043 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476757431844},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":50,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":65,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":80,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":94,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":103,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":113,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":125,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":134,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476758069041},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":50,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":65,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":80,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":94,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":103,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":113,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":125,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":135,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"userOrID","description":"The user to send the friend request to.","type":{"types":[[["UserResolveable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":146,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"userOrID","description":"The user to remove from your friends","type":{"types":[[["UserResolveable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":156,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index e885ac50b..58a1f931c 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -638,6 +638,26 @@ class RESTMethods { }).catch(reject); }); } + + addFriend(user) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('post', Constants.Endpoints.relationships('@me'), true, { + discriminator: user.discriminator, + username: user.username, + }).then(() => { + resolve(user); + }).catch(reject); + }); + } + + removeFriend(user) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('delete', `${Constants.Endpoints.relationships('@me')}/${user.id}`, true) + .then(() => { + resolve(user); + }).catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index cf6fee66b..c4a8b14a6 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -126,6 +126,28 @@ class ClientUser extends User { return this.setPresence({ afk }); } + /** + * Send a friend request + * This is only available for user accounts, not bot accounts! + * @param {UserResolvable} user The user to send the friend request to. + * @returns {Promise} The user the friend request was sent to. + */ + addFriend(user) { + user = this.client.resolver.resolveUser(user); + return this.client.rest.methods.addFriend(user); + } + + /** + * Remove a friend + * This is only available for user accounts, not bot accounts! + * @param {UserResolvable} user The user to remove from your friends + * @returns {Promise} The user that was removed + */ + removeFriend(user) { + user = this.client.resolver.resolveUser(user); + return this.client.rest.methods.removeFriend(user); + } + /** * Set the full presence of the current user. * @param {Object} data the data to provide diff --git a/src/util/Constants.js b/src/util/Constants.js index d8d326a5e..289d5e353 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -83,6 +83,7 @@ const Endpoints = exports.Endpoints = { avatar: (userID, avatar) => userID === '1' ? avatar : `${Endpoints.user(userID)}/avatars/${avatar}.jpg`, me: `${API}/users/@me`, meGuild: (guildID) => `${Endpoints.me}/guilds/${guildID}`, + relationships: (userID) => `${Endpoints.user(userID)}/relationships`, // guilds guilds: `${API}/guilds`, From d0463926c4c5f5677ed5dd13dc30b0b650481b2c Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Tue, 18 Oct 2016 21:23:35 -0400 Subject: [PATCH 57/62] Add maxMatches CollectorOption --- src/structures/MessageCollector.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/structures/MessageCollector.js b/src/structures/MessageCollector.js index 48234d4a4..375bc845a 100644 --- a/src/structures/MessageCollector.js +++ b/src/structures/MessageCollector.js @@ -24,6 +24,7 @@ class MessageCollector extends EventEmitter { * @typedef {Object} CollectorOptions * @property {number} [time] Duration for the collector in milliseconds * @property {number} [max] Maximum number of messages to handle + * @property {number} [maxMatches] Maximum number of successfully filtered messages to obtain */ /** @@ -86,7 +87,8 @@ class MessageCollector extends EventEmitter { * @event MessageCollector#message */ this.emit('message', message, this); - if (this.options.max && this.collected.size === this.options.max) this.stop('limit'); + if (this.collected.size >= this.options.maxMatches) this.stop('matchesLimit'); + else if (this.options.max && this.collected.size === this.options.max) this.stop('limit'); return true; } return false; From caec3648c01cf85774adeb4adb2666475c9564b7 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Fri, 21 Oct 2016 02:35:36 -0400 Subject: [PATCH 58/62] Added onlyInlineCode to escapeMarkdown --- src/util/EscapeMarkdown.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/EscapeMarkdown.js b/src/util/EscapeMarkdown.js index 01e01206f..9db8c13eb 100644 --- a/src/util/EscapeMarkdown.js +++ b/src/util/EscapeMarkdown.js @@ -1,4 +1,5 @@ -module.exports = function escapeMarkdown(text, onlyCodeBlock = false) { +module.exports = function escapeMarkdown(text, onlyCodeBlock = false, onlyInlineCode = false) { if (onlyCodeBlock) return text.replace(/```/g, '`\u200b``'); + if (onlyInlineCode) return text.replace(/\\(`|\\)/g, '$1').replace(/(`|\\)/g, '\\$1'); return text.replace(/\\(\*|_|`|~|\\)/g, '$1').replace(/(\*|_|`|~|\\)/g, '\\$1'); }; From aa4cb97a1c10d54e0ee8228961b2580b89b2f7e2 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 22 Oct 2016 14:48:07 -0400 Subject: [PATCH 59/62] Removed production flag from installs --- README.md | 8 ++++---- docs/custom/documents/welcome.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 20c73fb01..11c637acf 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,9 @@ discord.js is a powerful node.js module that allows you to interact with the [Di ## Installation **Node.js 6.0.0 or newer is required.** -Without voice support: `npm install discord.js --save --production` -With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` -With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` +Without voice support: `npm install discord.js --save` +With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` +With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` If both audio packages are installed, discord.js will automatically choose node-opus. The preferred audio engine is node-opus, as it performs significantly better than opusscript. @@ -56,7 +56,7 @@ A bot template using discord.js can be generated using [generator-discordbot](ht * [NPM](https://www.npmjs.com/package/discord.js) * [Related libraries](https://discordapi.com/unofficial/libs.html) -## Contributing +## Contributing Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the [documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master). See [the contributing guide](CONTRIBUTING.md) if you'd like to submit a PR. diff --git a/docs/custom/documents/welcome.md b/docs/custom/documents/welcome.md index dccf80bbd..d2b50758c 100644 --- a/docs/custom/documents/welcome.md +++ b/docs/custom/documents/welcome.md @@ -20,9 +20,9 @@ stable and performant than previous versions. ## Installation **Node.js 6.0.0 or newer is required.** -Without voice support: `npm install discord.js --save --production` -With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` -With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` +Without voice support: `npm install discord.js --save` +With voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` +With voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` If both audio packages are installed, discord.js will automatically prefer node-opus. The preferred audio engine is node-opus, as it performs significantly better than opusscript. From 9f7c63079675aae22c0859c1f01ff51e9daf1f0e Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Sat, 22 Oct 2016 13:51:21 -0500 Subject: [PATCH 60/62] lel (#824) --- src/sharding/ShardingManager.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js index 911fa47b7..d88678954 100644 --- a/src/sharding/ShardingManager.js +++ b/src/sharding/ShardingManager.js @@ -108,6 +108,7 @@ class ShardingManager extends EventEmitter { return new Promise((resolve, reject) => { if (amount === 'auto') { getRecommendedShards(this.token).then(count => { + this.totalShards = count; resolve(this._spawn(count, delay)); }).catch(reject); } else { From 422b90c71151565f1d97232d72d8f7dac1776415 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Sat, 22 Oct 2016 15:25:55 -0500 Subject: [PATCH 61/62] add way more friend shit (#815) --- docs/docs.json | 2 +- src/client/rest/RESTMethods.js | 18 +++++++++++ .../packets/WebSocketPacketManager.js | 2 ++ .../websocket/packets/handlers/Ready.js | 8 +++-- .../packets/handlers/RelationshipAdd.js | 19 +++++++++++ .../packets/handlers/RelationshipRemove.js | 19 +++++++++++ src/structures/ClientUser.js | 7 ++++ src/structures/User.js | 32 +++++++++++++++++++ src/util/Constants.js | 2 ++ 9 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 src/client/websocket/packets/handlers/RelationshipAdd.js create mode 100644 src/client/websocket/packets/handlers/RelationshipRemove.js diff --git a/docs/docs.json b/docs/docs.json index 7debed043..c6709ab30 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476758069041},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":50,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":65,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":80,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":94,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":103,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":113,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":125,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":135,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"userOrID","description":"The user to send the friend request to.","type":{"types":[[["UserResolveable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":146,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"userOrID","description":"The user to remove from your friends","type":{"types":[[["UserResolveable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":156,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":132,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":41,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":47,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":53,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":65,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":101,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":82,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":136,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":144,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":162,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1476979959835},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":110,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":120,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":132,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":142,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":153,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":163,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/rest/RESTMethods.js b/src/client/rest/RESTMethods.js index 58a1f931c..711c47653 100644 --- a/src/client/rest/RESTMethods.js +++ b/src/client/rest/RESTMethods.js @@ -658,6 +658,24 @@ class RESTMethods { }).catch(reject); }); } + + blockUser(user) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('put', `${Constants.Endpoints.relationships('@me')}/${user.id}`, true, { type: 2 }) + .then(() => { + resolve(user); + }).catch(reject); + }); + } + + unblockUser(user) { + return new Promise((resolve, reject) => { + this.rest.makeRequest('delete', `${Constants.Endpoints.relationships('@me')}/${user.id}`, true) + .then(() => { + resolve(user); + }).catch(reject); + }); + } } module.exports = RESTMethods; diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js index 31e08d0fb..6d49ee257 100644 --- a/src/client/websocket/packets/WebSocketPacketManager.js +++ b/src/client/websocket/packets/WebSocketPacketManager.js @@ -42,6 +42,8 @@ class WebSocketPacketManager { this.register(Constants.WSEvents.MESSAGE_DELETE_BULK, 'MessageDeleteBulk'); this.register(Constants.WSEvents.CHANNEL_PINS_UPDATE, 'ChannelPinsUpdate'); this.register(Constants.WSEvents.GUILD_SYNC, 'GuildSync'); + this.register(Constants.WSEvents.RELATIONSHIP_ADD, 'RelationshipAdd'); + this.register(Constants.WSEvents.RELATIONSHIP_REMOVE, 'RelationshipRemove'); } get client() { diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index eceb36103..b512c962d 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -17,8 +17,12 @@ class ReadyHandler extends AbstractHandler { for (const privateDM of data.private_channels) client.dataManager.newChannel(privateDM); for (const relation of data.relationships) { - const friend = client.dataManager.newUser(relation.user); - client.user.friends.set(friend.id, friend); + const user = client.dataManager.newUser(relation.user); + if (relation.type === 1) { + client.user.friends.set(user.id, user); + } else if (relation.type === 2) { + client.user.blocked.set(user.id, user); + } } data.presences = data.presences || []; diff --git a/src/client/websocket/packets/handlers/RelationshipAdd.js b/src/client/websocket/packets/handlers/RelationshipAdd.js new file mode 100644 index 000000000..122b4c507 --- /dev/null +++ b/src/client/websocket/packets/handlers/RelationshipAdd.js @@ -0,0 +1,19 @@ +const AbstractHandler = require('./AbstractHandler'); + +class RelationshipAddHandler extends AbstractHandler { + handle(packet) { + const client = this.packetManager.client; + const data = packet.d; + if (data.type === 1) { + client.fetchUser(data.id).then(user => { + client.user.friends.set(user.id, user); + }); + } else if (data.type === 2) { + client.fetchUser(data.id).then(user => { + client.user.blocked.set(user.id, user); + }); + } + } +} + +module.exports = RelationshipAddHandler; diff --git a/src/client/websocket/packets/handlers/RelationshipRemove.js b/src/client/websocket/packets/handlers/RelationshipRemove.js new file mode 100644 index 000000000..b57326ad6 --- /dev/null +++ b/src/client/websocket/packets/handlers/RelationshipRemove.js @@ -0,0 +1,19 @@ +const AbstractHandler = require('./AbstractHandler'); + +class RelationshipRemoveHandler extends AbstractHandler { + handle(packet) { + const client = this.packetManager.client; + const data = packet.d; + if (data.type === 2) { + if (client.user.blocked.has(data.id)) { + client.user.blocked.delete(data.id); + } + } else if (data.type === 1) { + if (client.user.friends.has(data.id)) { + client.user.friends.delete(data.id); + } + } + } +} + +module.exports = RelationshipRemoveHandler; diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index c4a8b14a6..eff683887 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -29,6 +29,13 @@ class ClientUser extends User { * @type {Collection} */ this.friends = new Collection(); + + /** + * A Collection of blocked users for the logged in user. + * This is only filled for user accounts, not bot accounts! + * @type {Collection} + */ + this.blocked = new Collection(); } edit(data) { diff --git a/src/structures/User.js b/src/structures/User.js index 2e1dbc6ed..5eaea7aba 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -135,6 +135,38 @@ class User { return this.client.rest.methods.deleteChannel(this); } + /** + * Sends a friend request to the user + * @returns {Promise} + */ + addFriend() { + return this.client.rest.methods.addFriend(this); + } + + /** + * Removes the user from your friends + * @returns {Promise} + */ + removeFriend() { + return this.client.rest.methods.removeFriend(this); + } + + /** + * Blocks the user + * @returns {Promise} + */ + block() { + return this.client.rest.methods.blockUser(this); + } + + /** + * Unblocks the user + * @returns {Promise} + */ + unblock() { + return this.client.rest.methods.unblockUser(this); + } + /** * Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played. * It is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties. diff --git a/src/util/Constants.js b/src/util/Constants.js index 289d5e353..2adb29dae 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -226,6 +226,8 @@ exports.WSEvents = { FRIEND_ADD: 'RELATIONSHIP_ADD', FRIEND_REMOVE: 'RELATIONSHIP_REMOVE', VOICE_SERVER_UPDATE: 'VOICE_SERVER_UPDATE', + RELATIONSHIP_ADD: 'RELATIONSHIP_ADD', + RELATIONSHIP_REMOVE: 'RELATIONSHIP_REMOVE', }; exports.MessageTypes = { From b020fae258ff5cb0f135b573b5417347cde11ab2 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Sat, 22 Oct 2016 22:43:07 -0500 Subject: [PATCH 62/62] fix emoji updates (#826) --- docs/docs.json | 2 +- src/client/ClientDataManager.js | 6 ++++++ src/client/actions/GuildEmojiUpdate.js | 12 +++++++----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index c6709ab30..14157831d 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1476979959835},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":21,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the emoji was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"emoji","description":"The emoji that was updated.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":160,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":171,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":186,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":110,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":120,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":132,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":142,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":153,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":163,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save --production` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save --production` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save --production` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file +{"meta":{"version":13,"date":1477179544721},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":19,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":227,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"tokenOrEmail","description":"The token or email used for the account. If it is an email, a password _must_ be\nprovided.","type":{"types":[[["string",""]]]}},{"name":"password","description":"The password for the account, only needed if an email was provided.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Client#destroy","name":"destroy","description":"Destroys the client and logs out.","memberof":"Client","meta":{"line":236,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":256,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]],[["Collection",".<"],["string",", "],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":271,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":281,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"invite","description":"An invite code or URL","type":{"types":[[["InviteResolvable",""]]]}}]},{"id":"Client#fetchWebhook","name":"fetchWebhook","description":"Fetch a webhook by ID.","memberof":"Client","meta":{"line":291,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"id","description":"ID of the webhook","type":{"types":[[["string",""]]]}}]},{"id":"Client#sweepMessages","name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","memberof":"Client","meta":{"line":303,"file":"Client.js","path":"src/client"},"returns":{"types":[[["number",""]]]},"params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"Client#options","name":"options","description":"The options the client was instantiated with","memberof":"Client","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":34,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#shard","name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","memberof":"Client","type":{"types":[[["ShardUtil",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":96,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":102,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":108,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#presences","name":"presences","description":"A Collection of presences for friends of the logged in user.\nThis is only present for user accounts, not bot accounts!","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":115,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":122,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":131,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":137,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":143,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyAt","name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":149,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#status","name":"status","description":"The status for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":164,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#uptime","name":"uptime","description":"The uptime for the logged in Client.","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":173,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":182,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#emojis","name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":191,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTimestamp","name":"readyTimestamp","description":"The timestamp that the client was last ready at","memberof":"Client","type":{"types":[[["number",""]]]},"meta":{"line":204,"file":"Client.js","path":"src/client"},"props":[]}],"events":[{"id":"Client#event:channelUpdate","name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","memberof":"Client","meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"},"params":[{"name":"oldChannel","description":"The channel before the update","type":{"types":[[["Channel",""]]]}},{"name":"newChannel","description":"The channel after the update","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:guildUnavailable","name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","memberof":"Client","meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that has become unavailable.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildEmojiCreate","name":"guildEmojiCreate","description":"Emitted whenever an emoji is created","memberof":"Client","meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was created.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiDelete","name":"guildEmojiDelete","description":"Emitted whenever an emoji is deleted","memberof":"Client","meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"},"params":[{"name":"emoji","description":"The emoji that was deleted.","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildEmojiUpdate","name":"guildEmojiUpdate","description":"Emitted whenever an emoji is updated","memberof":"Client","meta":{"line":23,"file":"GuildEmojiUpdate.js","path":"src/client/actions"},"params":[{"name":"oldEmoji","description":"The old emoji","type":{"types":[[["Emoji",""]]]}},{"name":"newEmoji","description":"The new emoji","type":{"types":[[["Emoji",""]]]}}]},{"id":"Client#event:guildMemberRemove","name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","memberof":"Client","meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the member has left.","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has left the guild.","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildRoleCreate","name":"guildRoleCreate","description":"Emitted whenever a guild role is created.","memberof":"Client","meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was created in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was created.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleDelete","name":"guildRoleDelete","description":"Emitted whenever a guild role is deleted.","memberof":"Client","meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was deleted in.","type":{"types":[[["Guild",""]]]}},{"name":"role","description":"The role that was deleted.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildRoleUpdate","name":"guildRoleUpdate","description":"Emitted whenever a guild role is updated.","memberof":"Client","meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"},"params":[{"name":"guild","description":"The guild that the role was updated in.","type":{"types":[[["Guild",""]]]}},{"name":"oldRole","description":"The role before the update.","type":{"types":[[["Role",""]]]}},{"name":"newRole","description":"The role after the update.","type":{"types":[[["Role",""]]]}}]},{"id":"Client#event:guildUpdate","name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","memberof":"Client","meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"},"params":[{"name":"oldGuild","description":"The guild before the update.","type":{"types":[[["Guild",""]]]}},{"name":"newGuild","description":"The guild after the update.","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:messageUpdate","name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","memberof":"Client","meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"},"params":[{"name":"oldMessage","description":"The message before the update.","type":{"types":[[["Message",""]]]}},{"name":"newMessage","description":"The message after the update.","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:warn","name":"warn","description":"Emitted for general warnings","memberof":"Client","meta":{"line":404,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"warning","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:debug","name":"debug","description":"Emitted for general debugging information","memberof":"Client","meta":{"line":410,"file":"Client.js","path":"src/client"},"params":[{"name":"The","description":"debug information","type":{"types":[[["string",""]]]}}]},{"id":"Client#event:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","memberof":"Client","meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the presence update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the presence update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:userUpdate","name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","memberof":"Client","meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldUser","description":"The user before the update","type":{"types":[[["User",""]]]}},{"name":"newUser","description":"The user after the update","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildMemberAvailable","name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large Guild","memberof":"Client","meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the member became available in","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that became available","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:typingStart","name":"typingStart","description":"Emitted whenever a user starts typing in a channel","memberof":"Client","meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:disconnect","name":"disconnect","description":"Emitted whenever the client websocket is disconnected","memberof":"Client","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":233,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":243,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":286,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":699,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":722,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":747,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or not the member is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"StreamDispatcher","name":"StreamDispatcher","description":"The class that sends voice packet data to the voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n // you can play a file or a stream here:\n connection.playFile('./file.mp3').then(dispatcher => {\n\n });\n});\n```","meta":{"line":20,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"extends":["EventEmitter"],"methods":[{"id":"StreamDispatcher#setVolume","name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","memberof":"StreamDispatcher","meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"volume","description":"The volume that you want to set","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeDecibels","name":"setVolumeDecibels","description":"Set the volume in decibels","memberof":"StreamDispatcher","meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"db","description":"The decibels","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#setVolumeLogarithmic","name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","memberof":"StreamDispatcher","meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[{"name":"value","description":"The value for the volume","type":{"types":[[["number",""]]]}}]},{"id":"StreamDispatcher#pause","name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","memberof":"StreamDispatcher","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#resume","name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","memberof":"StreamDispatcher","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"StreamDispatcher#end","name":"end","description":"Stops the current stream permanently and emits an `end` event.","memberof":"StreamDispatcher","meta":{"line":118,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"returns":{"types":[[["null",""]]]},"params":[]}],"properties":[{"id":"StreamDispatcher#passes","name":"passes","description":"How many passes the dispatcher should take when sending packets to reduce packet loss. Values over 5\naren't recommended, as it means you are using 5x more bandwidth. You _can_ edit this at runtime.","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#paused","name":"paused","description":"Whether playing is paused","memberof":"StreamDispatcher","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#time","name":"time","description":"How long the stream dispatcher has been \"speaking\" for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#totalStreamTime","name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]},{"id":"StreamDispatcher#volume","name":"volume","description":"The volume of the stream, relative to the stream's input volume","memberof":"StreamDispatcher","type":{"types":[[["number",""]]]},"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"props":[]}],"events":[{"id":"StreamDispatcher#event:speaking","name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","memberof":"StreamDispatcher","meta":{"line":124,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":{"types":[[["boolean",""]]]}}]},{"id":"StreamDispatcher#event:start","name":"start","description":"Emitted once the dispatcher starts streaming","memberof":"StreamDispatcher","meta":{"line":193,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:end","name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","memberof":"StreamDispatcher","meta":{"line":234,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[]},{"id":"StreamDispatcher#event:error","name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","memberof":"StreamDispatcher","meta":{"line":243,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"err","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"StreamDispatcher#event:debug","name":"debug","description":"Emitted when the stream wants to give debug information.","memberof":"StreamDispatcher","meta":{"line":254,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"},"params":[{"name":"information","description":"The debug information","type":{"types":[[["string",""]]]}}]}]},{"id":"VoiceReceiver","name":"VoiceReceiver","description":"Receives voice data from a voice connection.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n const receiver = connection.createReceiver();\n});\n```","meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"extends":["EventEmitter"],"methods":[{"id":"VoiceReceiver#recreate","name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\nAny streams that you had prior to destroying the receiver will not be recreated.","memberof":"VoiceReceiver","meta":{"line":62,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#destroy","name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","memberof":"VoiceReceiver","meta":{"line":72,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceReceiver#createOpusStream","name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","memberof":"VoiceReceiver","meta":{"line":91,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"VoiceReceiver#createPCMStream","name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceReceiver","meta":{"line":106,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"returns":{"types":[[["ReadableStream",""]]]},"params":[{"name":"user","description":"The user to create the stream for","type":{"types":[[["UserResolvable",""]]]}}]}],"properties":[{"id":"VoiceReceiver#destroyed","name":"destroyed","description":"Whether or not this receiver has been destroyed.","memberof":"VoiceReceiver","type":{"types":[[["boolean",""]]]},"meta":{"line":32,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]},{"id":"VoiceReceiver#connection","name":"connection","description":"The VoiceConnection that instantiated this","memberof":"VoiceReceiver","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":37,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"props":[]}],"events":[{"id":"VoiceReceiver#event:warn","name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","memberof":"VoiceReceiver","meta":{"line":119,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"message","description":"The warning message","type":{"types":[[["string",""]]]}}]},{"id":"VoiceReceiver#event:opus","name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","memberof":"VoiceReceiver","meta":{"line":129,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The opus buffer","type":{"types":[[["Buffer",""]]]}}]},{"id":"VoiceReceiver#event:pcm","name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","memberof":"VoiceReceiver","meta":{"line":137,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"},"params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":{"types":[[["User",""]]]}},{"name":"buffer","description":"The decoded buffer","type":{"types":[[["Buffer",""]]]}}]}]},{"id":"VoiceConnection","name":"VoiceConnection","description":"Represents a connection to a Voice Channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","meta":{"line":18,"file":"VoiceConnection.js","path":"src/client/voice"},"extends":["EventEmitter"],"methods":[{"id":"VoiceConnection#disconnect","name":"disconnect","description":"Disconnects the Client from the Voice Channel.","memberof":"VoiceConnection","meta":{"line":100,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection.","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"meta":{"line":235,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playStream","name":"playStream","description":"Plays and converts an audio stream in the voice connection.","memberof":"VoiceConnection","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"meta":{"line":256,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"stream","description":"The audio stream to play.","type":{"types":[[["ReadableStream",""]]]}},{"name":"options","description":"Options for playing the stream","optional":true,"type":{"types":[[["StreamOptions",""]]]}}]},{"id":"VoiceConnection#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":87,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":125,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":149,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":202,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"WebhookClient","name":"WebhookClient","description":"The Webhook Client","meta":{"line":11,"file":"WebhookClient.js","path":"src/client"},"extends":["Webhook"],"classConstructor":{"id":"WebhookClient()","name":"WebhookClient","memberof":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":{"types":[[["string",""]]]}},{"name":"token","description":"the token of the webhook.","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"WebhookClient#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"WebhookClient","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendMessage","inherited":true,"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"WebhookClient","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"inherits":"Webhook#sendSlackMessage","inherited":true,"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"WebhookClient#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"WebhookClient","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"Webhook#sendTTSMessage","inherited":true,"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendFile","inherited":true,"meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"WebhookClient","inherits":"Webhook#sendCode","inherited":true,"meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"WebhookClient#edit","name":"edit","description":"Edit the Webhook.","memberof":"WebhookClient","inherits":"Webhook#edit","inherited":true,"meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"WebhookClient#delete","name":"delete","description":"Delete the Webhook","memberof":"WebhookClient","inherits":"Webhook#delete","inherited":true,"meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"WebhookClient#options","name":"options","description":"The options the client was instantiated with","memberof":"WebhookClient","type":{"types":[[["ClientOptions",""]]]},"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"},"props":[]},{"id":"WebhookClient#client","name":"client","description":"The client that instantiated the Channel","memberof":"WebhookClient","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#name","name":"name","description":"The name of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#token","name":"token","description":"The token for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#id","name":"id","description":"The ID of the Webhook","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"WebhookClient#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"WebhookClient","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":9,"file":"Shard.js","path":"src/sharding"},"classConstructor":{"id":"Shard()","name":"Shard","memberof":"Shard","params":[{"name":"manager","description":"The sharding manager","type":{"types":[[["ShardingManager",""]]]}},{"name":"id","description":"The ID of this shard","type":{"types":[[["number",""]]]}},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"type":{"types":[[["array",""]]]}}]},"methods":[{"id":"Shard#send","name":"send","description":"Sends a message to the shard's process.","memberof":"Shard","meta":{"line":59,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"message","description":"Message to send to the shard","type":{"types":[["*",""]]}}]},{"id":"Shard#fetchClientValue","name":"fetchClientValue","description":"Fetches a Client property value of the shard.","memberof":"Shard","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"Shard#eval","name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","memberof":"Shard","meta":{"line":105,"file":"Shard.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<*>"]]]},"params":[{"name":"script","description":"JavaScript to run on the shard","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Shard#manager","name":"manager","description":"Manager that created the shard","memberof":"Shard","type":{"types":[[["ShardingManager",""]]]},"meta":{"line":20,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#id","name":"id","description":"ID of the shard","memberof":"Shard","type":{"types":[[["number",""]]]},"meta":{"line":26,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#env","name":"env","description":"The environment variables for the shard","memberof":"Shard","type":{"types":[[["Object",""]]]},"meta":{"line":32,"file":"Shard.js","path":"src/sharding"},"props":[]},{"id":"Shard#process","name":"process","description":"Process of the shard","memberof":"Shard","type":{"types":[[["ChildProcess",""]]]},"meta":{"line":42,"file":"Shard.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardClientUtil","name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"},"classConstructor":{"id":"ShardClientUtil()","name":"ShardClientUtil","memberof":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":{"types":[[["Client",""]]]}}]},"methods":[{"id":"ShardClientUtil#send","name":"send","description":"Sends a message to the master process","memberof":"ShardClientUtil","meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["void",">"]]]},"params":[{"name":"message","description":"Message to send","type":{"types":[["*",""]]}}]},{"id":"ShardClientUtil#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardClientUtil","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardClientUtil","meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardClientUtil.singleton","name":"singleton","description":"Creates/gets the singleton of this class","memberof":"ShardClientUtil","meta":{"line":132,"file":"ShardClientUtil.js","path":"src/sharding"},"returns":{"types":[[["ShardUtil",""]]]},"params":[{"name":"client","description":"Client to use","type":{"types":[[["Client",""]]]}}]}],"properties":[{"id":"ShardClientUtil#id","name":"id","description":"ID of this shard","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]},{"id":"ShardClientUtil#count","name":"count","description":"Total number of shards","memberof":"ShardClientUtil","type":{"types":[[["number",""]]]},"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"ShardingManager","name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.\nThe Sharding Manager is still experimental","meta":{"line":16,"file":"ShardingManager.js","path":"src/sharding"},"extends":["EventEmitter"],"classConstructor":{"id":"ShardingManager()","name":"ShardingManager","memberof":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":{"types":[[["string",""]]]}},{"name":"options","description":"Options for the sharding manager","optional":true,"type":{"types":[[["Object",""]]]}},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"type":{"types":[[["number",""]],[["string",""]]]}},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":{"types":[[["string",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":89,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Shard",">"]]]},"params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":107,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["number",", "],["Shard",">>"]]]},"params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"ShardingManager#broadcast","name":"broadcast","description":"Send a message to all shards.","memberof":"ShardingManager","meta":{"line":161,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",".<"],["Shard",">>"]]]},"params":[{"name":"message","description":"Message to be sent to the shards","type":{"types":[["*",""]]}}]},{"id":"ShardingManager#broadcastEval","name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","memberof":"ShardingManager","meta":{"line":172,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"script","description":"JavaScript to run on each shard","type":{"types":[[["string",""]]]}}]},{"id":"ShardingManager#fetchClientValues","name":"fetchClientValues","description":"Fetches a Client property value of each shard.","memberof":"ShardingManager","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"meta":{"line":187,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["Promise",".<"],["Array",">"]]]},"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"Amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]],[["string",""]]]},"meta":{"line":48,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#respawn","name":"respawn","description":"Whether shards should automatically respawn upon exiting","memberof":"ShardingManager","type":{"types":[[["boolean",""]]]},"meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shardArgs","name":"shardArgs","description":"An array of arguments to pass to shards.","memberof":"ShardingManager","type":{"types":[[["Array",".<"],["string",">"]]]},"meta":{"line":69,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#token","name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":75,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#shards","name":"shards","description":"A collection of shards that this manager has spawned","memberof":"ShardingManager","type":{"types":[[["Collection",".<"],["number",", "],["Shard",">"]]]},"meta":{"line":81,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[{"id":"ShardingManager#event:launch","name":"launch","description":"Emitted upon launching a shard","memberof":"ShardingManager","meta":{"line":92,"file":"ShardingManager.js","path":"src/sharding"},"params":[{"name":"shard","description":"Shard that was launched","type":{"types":[[["Shard",""]]]}}]}]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"Channel#client","name":"client","description":"The client that instantiated the Channel","memberof":"Channel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#id","name":"id","description":"The unique ID of the channel","memberof":"Channel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"Channel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"Channel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"Channel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"ClientUser","name":"ClientUser","description":"Represents the logged in client's Discord User","meta":{"line":8,"file":"ClientUser.js","path":"src/structures"},"extends":["User"],"methods":[{"id":"ClientUser#setUsername","name":"setUsername","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"username","description":"The new username","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setEmail","name":"setEmail","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","examples":["// set email\nclient.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"meta":{"line":72,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"email","description":"The new email","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setPassword","name":"setPassword","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","examples":["// set password\nclient.user.setPassword('password123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"meta":{"line":87,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"password","description":"The new password","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAvatar","name":"setAvatar","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","examples":["// set avatar\nclient.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"meta":{"line":101,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"avatar","description":"The new avatar","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"ClientUser#setStatus","name":"setStatus","description":"Set the status of the logged in user.","memberof":"ClientUser","meta":{"line":110,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"status","description":"can be `online`, `idle`, `invisible` or `dnd` (do not disturb)","type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setGame","name":"setGame","description":"Set the current game of the logged in user.","memberof":"ClientUser","meta":{"line":120,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"game","description":"the game being played","type":{"types":[[["string",""]]]}},{"name":"streamingURL","description":"an optional URL to a twitch stream, if one is available.","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ClientUser#setAFK","name":"setAFK","description":"Set/remove the AFK flag for the current user.","memberof":"ClientUser","meta":{"line":132,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"afk","description":"whether or not the user is AFK.","type":{"types":[[["boolean",""]]]}}]},{"id":"ClientUser#addFriend","name":"addFriend","description":"Send a friend request\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":142,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to send the friend request to.","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#removeFriend","name":"removeFriend","description":"Remove a friend\nThis is only available for user accounts, not bot accounts!","memberof":"ClientUser","meta":{"line":153,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to remove from your friends","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"ClientUser#setPresence","name":"setPresence","description":"Set the full presence of the current user.","memberof":"ClientUser","meta":{"line":163,"file":"ClientUser.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["ClientUser",">"]]]},"params":[{"name":"data","description":"the data to provide","type":{"types":[[["Object",""]]]}}]},{"id":"ClientUser#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"ClientUser","inherits":"User#typingIn","inherited":true,"meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"ClientUser","inherits":"User#typingSinceIn","inherited":true,"meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"ClientUser","inherits":"User#typingDurationIn","inherited":true,"meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"ClientUser#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","inherits":"User#deleteDM","inherited":true,"meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"ClientUser#block","name":"block","description":"Blocks the user","memberof":"ClientUser","inherits":"User#block","inherited":true,"meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#unblock","name":"unblock","description":"Unblocks the user","memberof":"ClientUser","inherits":"User#unblock","inherited":true,"meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"ClientUser#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","inherits":"User#equals","inherited":true,"meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"ClientUser#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"ClientUser#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"ClientUser","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendMessage","inherited":true,"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"ClientUser#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"ClientUser","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"inherits":"User#sendTTSMessage","inherited":true,"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"ClientUser#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"ClientUser","inherits":"User#sendFile","inherited":true,"meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"ClientUser#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"ClientUser","inherits":"User#sendCode","inherited":true,"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"ClientUser#verified","name":"verified","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#email","name":"email","description":"The email of this account","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#friends","name":"friends","description":"A Collection of friends for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#blocked","name":"blocked","description":"A Collection of blocked users for the logged in user.\nThis is only filled for user accounts, not bot accounts!","memberof":"ClientUser","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"},"props":[]},{"id":"ClientUser#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"ClientUser","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#id","name":"id","description":"The ID of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#username","name":"username","description":"The username of the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"ClientUser","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#createdAt","name":"createdAt","description":"The time the user was created","memberof":"ClientUser","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#presence","name":"presence","description":"The presence of this user","memberof":"ClientUser","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"ClientUser#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"ClientUser","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"DMChannel","name":"DMChannel","description":"Represents a Direct Message Channel between two users.","meta":{"line":10,"file":"DMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"DMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","memberof":"DMChannel","meta":{"line":35,"file":"DMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"DMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"DMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"DMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"DMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"DMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"DMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"DMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"DMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"DMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"DMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"DMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"DMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"DMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"DMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"DMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"DMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"DMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"DMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"DMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"DMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"DMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"DMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"DMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"DMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"DMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"DMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"DMChannel#recipient","name":"recipient","description":"The recipient on the other end of the DM","memberof":"DMChannel","type":{"types":[[["User",""]]]},"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"DMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"DMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"DMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"DMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"DMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Emoji","name":"Emoji","description":"Represents a Custom Emoji","meta":{"line":7,"file":"Emoji.js","path":"src/structures"},"methods":[{"id":"Emoji#toString","name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","memberof":"Emoji","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"meta":{"line":101,"file":"Emoji.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Emoji#client","name":"client","description":"The Client that instantiated this object","memberof":"Emoji","type":{"types":[[["Client",""]]]},"meta":{"line":13,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#guild","name":"guild","description":"The Guild this emoji is part of","memberof":"Emoji","type":{"types":[[["Guild",""]]]},"meta":{"line":20,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#id","name":"id","description":"The ID of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":30,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#name","name":"name","description":"The name of the Emoji","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#requiresColons","name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":42,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#managed","name":"managed","description":"Whether this emoji is managed by an external service","memberof":"Emoji","type":{"types":[[["boolean",""]]]},"meta":{"line":48,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdTimestamp","name":"createdTimestamp","description":"The timestamp the emoji was created at","memberof":"Emoji","type":{"types":[[["number",""]]]},"meta":{"line":58,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#createdAt","name":"createdAt","description":"The time the emoji was created","memberof":"Emoji","type":{"types":[[["Date",""]]]},"meta":{"line":67,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#roles","name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","memberof":"Emoji","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":76,"file":"Emoji.js","path":"src/structures"},"props":[]},{"id":"Emoji#url","name":"url","description":"The URL to the emoji file","memberof":"Emoji","type":{"types":[[["string",""]]]},"meta":{"line":89,"file":"Emoji.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"EvaluatedPermissions","name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"},"methods":[{"id":"EvaluatedPermissions#serialize","name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","memberof":"EvaluatedPermissions","meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"EvaluatedPermissions#hasPermission","name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","memberof":"EvaluatedPermissions","meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#hasPermissions","name":"hasPermissions","description":"Checks whether the user has all specified permissions.","memberof":"EvaluatedPermissions","meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"EvaluatedPermissions#missingPermissions","name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","memberof":"EvaluatedPermissions","meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"properties":[{"id":"EvaluatedPermissions#member","name":"member","description":"The member this permissions refer to","memberof":"EvaluatedPermissions","type":{"types":[[["GuildMember",""]]]},"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]},{"id":"EvaluatedPermissions#raw","name":"raw","description":"A number representing the packed permissions","memberof":"EvaluatedPermissions","type":{"types":[[["number",""]]]},"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GroupDMChannel","name":"GroupDMChannel","description":"Represents a Group DM on Discord","meta":{"line":33,"file":"GroupDMChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GroupDMChannel#equals","name":"equals","description":"Whether this channel equals another channel. It compares all properties, so for most operations\nit is advisable to just compare `channel.id === channel2.id` as it is much faster and is often\nwhat most users need.","memberof":"GroupDMChannel","meta":{"line":96,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare to","type":{"types":[[["GroupDMChannel",""]]]}}]},{"id":"GroupDMChannel#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GroupDMChannel","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"meta":{"line":122,"file":"GroupDMChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GroupDMChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GroupDMChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GroupDMChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GroupDMChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GroupDMChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GroupDMChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GroupDMChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GroupDMChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"GroupDMChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"GroupDMChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"GroupDMChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"GroupDMChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"GroupDMChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"GroupDMChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"GroupDMChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"GroupDMChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"GroupDMChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"GroupDMChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"GroupDMChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"GroupDMChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"GroupDMChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"GroupDMChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"GroupDMChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"GroupDMChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"GroupDMChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GroupDMChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GroupDMChannel#name","name":"name","description":"The name of this Group DM, can be null if one isn't set.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":48,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#icon","name":"icon","description":"A hash of the Group DM icon.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#ownerID","name":"ownerID","description":"The user ID of this Group DM's owner.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#recipients","name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":67,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"GroupDMChannel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"GroupDMChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"GroupDMChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GroupDMChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GroupDMChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GroupDMChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Guild","name":"Guild","description":"Represents a Guild (or a Server) on Discord.\nIt's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.","meta":{"line":16,"file":"Guild.js","path":"src/structures"},"methods":[{"id":"Guild#member","name":"member","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"meta":{"line":279,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["GuildMember",""]]]},"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":287,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["User",">>"]]]},"params":[]},{"id":"Guild#fetchInvites","name":"fetchInvites","description":"Fetch a Collection of invites to this Guild. Resolves with a Collection mapping invites by their codes.","memberof":"Guild","meta":{"line":295,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Invite",">>"]]]},"params":[]},{"id":"Guild#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","memberof":"Guild","meta":{"line":303,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Collection",".<"],["Webhook",">"]]]},"params":[]},{"id":"Guild#fetchMember","name":"fetchMember","description":"Fetch a single guild member from a user.","memberof":"Guild","meta":{"line":312,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"user","description":"The user to fetch the member for","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchMembers","name":"fetchMembers","description":"Fetches all the members in the Guild, even if they are offline. If the Guild has less than 250 members,\nthis should not be necessary.","memberof":"Guild","meta":{"line":326,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"Guild#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"meta":{"line":360,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"data","description":"The data to update the guild with","type":{"types":[[["GuildEditData",""]]]}}]},{"id":"Guild#setName","name":"setName","description":"Edit the name of the Guild.","memberof":"Guild","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"meta":{"line":374,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"name","description":"The new name of the Guild","type":{"types":[[["string",""]]]}}]},{"id":"Guild#setRegion","name":"setRegion","description":"Edit the region of the Guild.","memberof":"Guild","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"meta":{"line":388,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"region","description":"The new region of the guild.","type":{"types":[[["Region",""]]]}}]},{"id":"Guild#setVerificationLevel","name":"setVerificationLevel","description":"Edit the verification level of the Guild.","memberof":"Guild","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"meta":{"line":402,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":{"types":[[["VerificationLevel",""]]]}}]},{"id":"Guild#setAFKChannel","name":"setAFKChannel","description":"Edit the AFK channel of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"meta":{"line":416,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkChannel","description":"The new AFK channel","type":{"types":[[["GuildChannelResolvable",""]]]}}]},{"id":"Guild#setAFKTimeout","name":"setAFKTimeout","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"meta":{"line":430,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":{"types":[[["number",""]]]}}]},{"id":"Guild#setIcon","name":"setIcon","description":"Set a new Guild Icon.","memberof":"Guild","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"meta":{"line":444,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"icon","description":"The new icon of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#setOwner","name":"setOwner","description":"Sets a new owner of the Guild.","memberof":"Guild","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"meta":{"line":458,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"owner","description":"The new owner of the Guild","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"Guild#setSplash","name":"setSplash","description":"Set a new Guild Splash Logo.","memberof":"Guild","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"meta":{"line":472,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[{"name":"splash","description":"The new splash screen of the guild","type":{"types":[[["Base64Resolvable",""]]]}}]},{"id":"Guild#ban","name":"ban","description":"Bans a user from the guild.","memberof":"Guild","examples":["// ban a user\nguild.ban('123123123123');"],"meta":{"line":488,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User","|"],["string",")>"]]]},"params":[{"name":"user","description":"The user to ban","type":{"types":[[["UserResolvable",""]]]}},{"name":"deleteDays","description":"The amount of days worth of messages from this user that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Guild#unban","name":"unban","description":"Unbans a user from the Guild.","memberof":"Guild","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"meta":{"line":502,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#pruneMembers","name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","memberof":"Guild","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"meta":{"line":522,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["number",">"]]]},"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":{"types":[[["number",""]]]}},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":530,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"Guild#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"meta":{"line":545,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["TextChannel","|"],["VoiceChannel",")>"]]]},"params":[{"name":"name","description":"The name of the new channel","type":{"types":[[["string",""]]]}},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":{"types":[[["string",""]]]}}]},{"id":"Guild#createRole","name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","memberof":"Guild","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"meta":{"line":564,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":{"types":[[["RoleData",""]]]}}]},{"id":"Guild#createEmoji","name":"createEmoji","description":"Creates a new custom emoji in the guild.","memberof":"Guild","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"meta":{"line":586,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Emoji",">"]]]},"params":[{"name":"attachment","description":"The image for the emoji.","type":{"types":[[["FileResolveable",""]]]}},{"name":"name","description":"The name for the emoji.","type":{"types":[[["string",""]]]}}]},{"id":"Guild#deleteEmoji","name":"deleteEmoji","description":"Delete an emoji.","memberof":"Guild","meta":{"line":602,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"emoji","description":"The emoji to delete.","type":{"types":[[["Emoji",""]],[["string",""]]]}}]},{"id":"Guild#leave","name":"leave","description":"Causes the Client to leave the guild.","memberof":"Guild","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"meta":{"line":616,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#delete","name":"delete","description":"Causes the Client to delete the guild.","memberof":"Guild","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"meta":{"line":629,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#equals","name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","meta":{"line":640,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"guild","description":"The guild to compare","type":{"types":[[["Guild",""]]]}}]},{"id":"Guild#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"meta":{"line":677,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Guild#client","name":"client","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"types":[[["Client",""]]]},"meta":{"line":22,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#members","name":"members","description":"A Collection of members that are in this Guild. The key is the member's ID, the value is the member.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":29,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#channels","name":"channels","description":"A Collection of channels that are in this Guild. The key is the channel's ID, the value is the channel.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]},"meta":{"line":35,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#roles","name":"roles","description":"A Collection of roles that are in this Guild. The key is the role's ID, the value is the role.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":41,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#available","name":"available","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":49,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#id","name":"id","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":55,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#name","name":"name","description":"The name of the guild","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":72,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#icon","name":"icon","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":78,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":84,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#region","name":"region","description":"The region the guild is located in","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":90,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#memberCount","name":"memberCount","description":"The full amount of members in this Guild as of `READY`","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":96,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#large","name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":102,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#presences","name":"presences","description":"A collection of presences in this Guild","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Presence",">"]]]},"meta":{"line":108,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#features","name":"features","description":"An array of guild features.","memberof":"Guild","type":{"types":[[["Array",".<"],["Object",">"]]]},"meta":{"line":114,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#emojis","name":"emojis","description":"A Collection of emojis that are in this Guild. The key is the emoji's ID, the value is the emoji.","memberof":"Guild","type":{"types":[[["Collection",".<"],["string",", "],["Emoji",">"]]]},"meta":{"line":120,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkTimeout","name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":127,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#afkChannelID","name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#embedEnabled","name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"types":[[["boolean",""]]]},"meta":{"line":139,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#verificationLevel","name":"verificationLevel","description":"The verification level of the guild.","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":145,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":151,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#ownerID","name":"ownerID","description":"The user ID of this guild's owner.","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":167,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdTimestamp","name":"createdTimestamp","description":"The timestamp the guild was created at","memberof":"Guild","type":{"types":[[["number",""]]]},"meta":{"line":212,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#createdAt","name":"createdAt","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":221,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinedAt","name":"joinedAt","description":"The time the client user joined the guild","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":230,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":239,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":249,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#voiceConnection","name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","memberof":"Guild","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":258,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#defaultChannel","name":"defaultChannel","description":"The `#general` GuildChannel of the server.","memberof":"Guild","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":267,"file":"Guild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildChannel","name":"GuildChannel","description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"line":13,"file":"GuildChannel.js","path":"src/structures"},"extends":["Channel"],"methods":[{"id":"GuildChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"GuildChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"GuildChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"GuildChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"GuildChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"GuildChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"GuildChannel","meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"GuildChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"GuildChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"GuildChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildChannel#delete","name":"delete","description":"Deletes the channel","memberof":"GuildChannel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"inherits":"Channel#delete","inherited":true,"meta":{"line":61,"file":"Channel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Channel",">"]]]},"params":[]}],"properties":[{"id":"GuildChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"GuildChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":21,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#id","name":"id","description":"The unique ID of the channel","memberof":"GuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdTimestamp","name":"createdTimestamp","description":"The timestamp the channel was created at","memberof":"GuildChannel","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GuildChannel#createdAt","name":"createdAt","description":"The time the channel was created","memberof":"GuildChannel","type":{"types":[[["Date",""]]]},"meta":{"line":48,"file":"Channel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"GuildMember","name":"GuildMember","description":"Represents a Member of a Guild on Discord","meta":{"line":11,"file":"GuildMember.js","path":"src/structures"},"methods":[{"id":"GuildMember#permissionsIn","name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","memberof":"GuildMember","meta":{"line":226,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"channel","description":"Guild channel to use as context","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#hasPermission","name":"hasPermission","description":"Checks if any of the member's roles have a permission.","memberof":"GuildMember","meta":{"line":238,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#hasPermissions","name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","memberof":"GuildMember","meta":{"line":249,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#missingPermissions","name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","memberof":"GuildMember","meta":{"line":260,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["array",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#edit","name":"edit","description":"Edit a Guild Member","memberof":"GuildMember","meta":{"line":269,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"data","description":"The data to edit the member with","type":{"types":[[["GuildmemberEditData",""]]]}}]},{"id":"GuildMember#setMute","name":"setMute","description":"Mute/unmute a user","memberof":"GuildMember","meta":{"line":278,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"mute","description":"Whether or not the member should be muted","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setDeaf","name":"setDeaf","description":"Deafen/undeafen a user","memberof":"GuildMember","meta":{"line":287,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":{"types":[[["boolean",""]]]}}]},{"id":"GuildMember#setVoiceChannel","name":"setVoiceChannel","description":"Moves the Guild Member to the given channel.","memberof":"GuildMember","meta":{"line":296,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"channel","description":"The channel to move the member to","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"GuildMember#setRoles","name":"setRoles","description":"Sets the Roles applied to the member.","memberof":"GuildMember","meta":{"line":305,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to apply","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#addRole","name":"addRole","description":"Adds a single Role to the member.","memberof":"GuildMember","meta":{"line":314,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to add","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#addRoles","name":"addRoles","description":"Adds multiple roles to the member.","memberof":"GuildMember","meta":{"line":323,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to add","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#removeRole","name":"removeRole","description":"Removes a single Role from the member.","memberof":"GuildMember","meta":{"line":339,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"role","description":"The role or ID of the role to remove","type":{"types":[[["Role",""]],[["string",""]]]}}]},{"id":"GuildMember#removeRoles","name":"removeRoles","description":"Removes multiple roles from the member.","memberof":"GuildMember","meta":{"line":348,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"roles","description":"The roles or role IDs to remove","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]],[["Array",".<"],["Role",">"]],[["Array",".<"],["string",">"]]]}}]},{"id":"GuildMember#setNickname","name":"setNickname","description":"Set the nickname for the Guild Member","memberof":"GuildMember","meta":{"line":369,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"nick","description":"The nickname for the Guild Member","type":{"types":[[["string",""]]]}}]},{"id":"GuildMember#deleteDM","name":"deleteDM","description":"Deletes any DMs with this Guild Member","memberof":"GuildMember","meta":{"line":377,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":385,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[]},{"id":"GuildMember#ban","name":"ban","description":"Ban this Guild Member","memberof":"GuildMember","examples":["// ban a guild member\nguildMember.ban(7);"],"meta":{"line":398,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildMember",">"]]]},"params":[{"name":"deleteDays","description":"The amount of days worth of messages from this member that should\nalso be deleted. Between `0` and `7`.","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"GuildMember#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the Member object.","memberof":"GuildMember","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"meta":{"line":409,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"GuildMember#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"GuildMember","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"GuildMember#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"GuildMember","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"GuildMember#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"GuildMember","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"GuildMember#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"GuildMember","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"GuildMember#client","name":"client","description":"The client that instantiated this GuildMember","memberof":"GuildMember","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#guild","name":"guild","description":"The guild that this member is part of","memberof":"GuildMember","type":{"types":[[["Guild",""]]]},"meta":{"line":24,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#user","name":"user","description":"The user that this guild member instance Represents","memberof":"GuildMember","type":{"types":[[["User",""]]]},"meta":{"line":30,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverDeaf","name":"serverDeaf","description":"Whether this member is deafened server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#serverMute","name":"serverMute","description":"Whether this member is muted server-wide","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfMute","name":"selfMute","description":"Whether this member is self-muted","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":53,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#selfDeaf","name":"selfDeaf","description":"Whether this member is self-deafened","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceSessionID","name":"voiceSessionID","description":"The voice session ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannelID","name":"voiceChannelID","description":"The voice channel ID of this member, if any","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":71,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#speaking","name":"speaking","description":"Whether this member is speaking","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":77,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#nickname","name":"nickname","description":"The nickname of this Guild Member, if they have one","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":83,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedTimestamp","name":"joinedTimestamp","description":"The timestamp the member joined the guild at","memberof":"GuildMember","type":{"types":[[["number",""]]]},"meta":{"line":89,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#joinedAt","name":"joinedAt","description":"The time the member joined the guild","memberof":"GuildMember","type":{"types":[[["Date",""]]]},"meta":{"line":100,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#presence","name":"presence","description":"The presence of this Guild Member","memberof":"GuildMember","type":{"types":[[["Presence",""]]]},"meta":{"line":109,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#roles","name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","memberof":"GuildMember","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]},"meta":{"line":118,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#highestRole","name":"highestRole","description":"The role of the member with the highest position.","memberof":"GuildMember","type":{"types":[[["Role",""]]]},"meta":{"line":137,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":146,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":155,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":164,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":173,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#permissions","name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","memberof":"GuildMember","type":{"types":[[["EvaluatedPermissions",""]]]},"meta":{"line":182,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#kickable","name":"kickable","description":"Whether the member is kickable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":200,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#bannable","name":"bannable","description":"Whether the member is bannable by the client user.","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":213,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":30,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":142,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]},{"id":"Invite#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Invite's URL instead of the object.","memberof":"Invite","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"meta":{"line":153,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":36,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"guild","description":"The Guild the invite is for. If this Guild is already known, this will be a Guild object. If the Guild is\nunknown, this will be a Partial Guild.","memberof":"Invite","type":{"types":[[["Guild",""]],[["PartialGuild",""]]]},"meta":{"line":48,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":54,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":66,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":72,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":78,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":85,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#channel","name":"channel","description":"The Channel the invite is for. If this Channel is already known, this will be a GuildChannel object.\nIf the Channel is unknown, this will be a Partial Guild Channel.","memberof":"Invite","type":{"types":[[["GuildChannel",""]],[["PartialGuildChannel",""]]]},"meta":{"line":93,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdTimestamp","name":"createdTimestamp","description":"The timestamp the invite was created at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":99,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#createdAt","name":"createdAt","description":"The time the invite was created","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":107,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresTimestamp","name":"expiresTimestamp","description":"The timestamp the invite will expire at","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":116,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#expiresAt","name":"expiresAt","description":"The time the invite will expire","memberof":"Invite","type":{"types":[[["Date",""]]]},"meta":{"line":125,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#url","name":"url","description":"The URL to the invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":134,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":10,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":316,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":{"types":[[["GuildChannel",""]],[["User",""]],[["Role",""]],[["string",""]]]}}]},{"id":"Message#edit","name":"edit","description":"Edit the content of the message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":331,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#editCode","name":"editCode","description":"Edit the content of the message, with a code block","memberof":"Message","meta":{"line":341,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"The new content for the message","type":{"types":[[["StringResolvable",""]]]}}]},{"id":"Message#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":350,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#unpin","name":"unpin","description":"Unpins this message from the channel's pinned messages","memberof":"Message","meta":{"line":358,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[]},{"id":"Message#delete","name":"delete","description":"Deletes the message","memberof":"Message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"meta":{"line":372,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"Message#reply","name":"reply","description":"Reply to the message","memberof":"Message","examples":["// reply to a message\nmessage.reply('Hey, I'm a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"meta":{"line":393,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content for the message","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"Message#equals","name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","meta":{"line":414,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message to compare it to","type":{"types":[[["Message",""]]]}},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":{"types":[[["Object",""]]]}}]},{"id":"Message#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Message's content instead of the object.","memberof":"Message","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"meta":{"line":443,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"Message#client","name":"client","description":"The client that instantiated the Message","memberof":"Message","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#channel","name":"channel","description":"The channel that the message was sent in","memberof":"Message","type":{"types":[[["TextChannel",""]],[["DMChannel",""]],[["GroupDMChannel",""]]]},"meta":{"line":23,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#id","name":"id","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#type","name":"type","description":"The type of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":51,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#member","name":"member","description":"Represents the Author of the message as a Guild Member. Only available if the message comes from a Guild\nwhere the author is still a member.","memberof":"Message","type":{"types":[[["GuildMember",""]]]},"meta":{"line":58,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":64,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":70,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":76,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":82,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":88,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":94,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#createdTimestamp","name":"createdTimestamp","description":"The timestamp the message was sent at","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":101,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["number",""]]]},"meta":{"line":107,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":118,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":{"types":[[["Collection",".<"],["string",", "],["GuildChannel",">"]]]}},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":{"types":[[["boolean",""]]]}}]},{"id":"Message#createdAt","name":"createdAt","description":"The time the message was sent","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":209,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedAt","name":"editedAt","description":"The time the message was last edited at (if applicable)","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":218,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"The guild the message was sent in (if in a guild channel)","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":227,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":237,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#edits","name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","memberof":"Message","type":{"types":[[["Array",".<"],["Message",">"]]]},"meta":{"line":276,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editable","name":"editable","description":"Whether the message is editable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":285,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#deletable","name":"deletable","description":"Whether the message is deletable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":294,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinnable","name":"pinnable","description":"Whether the message is pinnable by the client user.","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":305,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#message","name":"message","description":"The message this attachment is part of.","memberof":"MessageAttachment","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#id","name":"id","description":"The ID of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filename","name":"filename","description":"The file name of this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#filesize","name":"filesize","description":"The size of this attachment in bytes","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":39,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#url","name":"url","description":"The URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#proxyURL","name":"proxyURL","description":"The Proxy URL to this attachment","memberof":"MessageAttachment","type":{"types":[[["string",""]]]},"meta":{"line":51,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#height","name":"height","description":"The height of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":57,"file":"MessageAttachment.js","path":"src/structures"},"props":[]},{"id":"MessageAttachment#width","name":"width","description":"The width of this attachment (if an image)","memberof":"MessageAttachment","type":{"types":[[["number",""]]]},"meta":{"line":63,"file":"MessageAttachment.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"},"props":[]},{"id":"MessageCollector#next","name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","memberof":"MessageCollector","type":{"types":[[["Promise",".<"],["Message",">"]]]},"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"MessageEmbed","name":"MessageEmbed","description":"Represents an embed in an image - e.g. preview of image","meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbed#client","name":"client","description":"The client that instantiated this embed","memberof":"MessageEmbed","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#message","name":"message","description":"The message this embed is part of","memberof":"MessageEmbed","type":{"types":[[["Message",""]]]},"meta":{"line":17,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#title","name":"title","description":"The title of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#type","name":"type","description":"The type of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#description","name":"description","description":"The description of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#url","name":"url","description":"The URL of this embed","memberof":"MessageEmbed","type":{"types":[[["string",""]]]},"meta":{"line":45,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#thumbnail","name":"thumbnail","description":"The thumbnail of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedThumbnail",""]]]},"meta":{"line":51,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#author","name":"author","description":"The author of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedAuthor",""]]]},"meta":{"line":57,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbed#provider","name":"provider","description":"The provider of this embed, if there is one","memberof":"MessageEmbed","type":{"types":[[["MessageEmbedProvider",""]]]},"meta":{"line":63,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedThumbnail","name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a Message embed","meta":{"line":70,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedThumbnail#embed","name":"embed","description":"The embed this thumbnail is part of","memberof":"MessageEmbedThumbnail","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":76,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#url","name":"url","description":"The URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":86,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#proxyURL","name":"proxyURL","description":"The Proxy URL for this thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["string",""]]]},"meta":{"line":92,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#height","name":"height","description":"The height of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":98,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedThumbnail#width","name":"width","description":"The width of the thumbnail","memberof":"MessageEmbedThumbnail","type":{"types":[[["number",""]]]},"meta":{"line":104,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedProvider","name":"MessageEmbedProvider","description":"Represents a Provider for a Message embed","meta":{"line":111,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedProvider#embed","name":"embed","description":"The embed this provider is part of","memberof":"MessageEmbedProvider","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":117,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#name","name":"name","description":"The name of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":127,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedProvider#url","name":"url","description":"The URL of this provider","memberof":"MessageEmbedProvider","type":{"types":[[["string",""]]]},"meta":{"line":133,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageEmbedAuthor","name":"MessageEmbedAuthor","description":"Represents a Author for a Message embed","meta":{"line":140,"file":"MessageEmbed.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageEmbedAuthor#embed","name":"embed","description":"The embed this author is part of","memberof":"MessageEmbedAuthor","type":{"types":[[["MessageEmbed",""]]]},"meta":{"line":146,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#name","name":"name","description":"The name of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"},"props":[]},{"id":"MessageEmbedAuthor#url","name":"url","description":"The URL of this author","memberof":"MessageEmbedAuthor","type":{"types":[[["string",""]]]},"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuild","name":"PartialGuild","description":"Represents a Guild that the client only has limited information for - e.g. from invites.","meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuild#client","name":"client","description":"The client that instantiated this PartialGuild","memberof":"PartialGuild","type":{"types":[[["Client",""]]]},"meta":{"line":17,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#id","name":"id","description":"The ID of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":28,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#name","name":"name","description":"The name of this guild","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":34,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#icon","name":"icon","description":"The hash of this guild's icon, or null if there is none.","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":40,"file":"PartialGuild.js","path":"src/structures"},"props":[]},{"id":"PartialGuild#splash","name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"PartialGuild","type":{"types":[[["string",""]]]},"meta":{"line":46,"file":"PartialGuild.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PartialGuildChannel","name":"PartialGuildChannel","description":"Represents a Guild Channel that the client only has limited information for - e.g. from invites.","meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"},"methods":[],"properties":[{"id":"PartialGuildChannel#client","name":"client","description":"The client that instantiated this PartialGuildChannel","memberof":"PartialGuildChannel","type":{"types":[[["Client",""]]]},"meta":{"line":16,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#id","name":"id","description":"The ID of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":27,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#name","name":"name","description":"The name of this Guild Channel","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":33,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]},{"id":"PartialGuildChannel#type","name":"type","description":"The type of this Guild Channel - `text` or `voice`","memberof":"PartialGuildChannel","type":{"types":[[["string",""]]]},"meta":{"line":39,"file":"PartialGuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"PermissionOverwrites","name":"PermissionOverwrites","description":"Represents a permission overwrite for a Role or Member in a Guild Channel.","meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"},"methods":[{"id":"PermissionOverwrites#delete","name":"delete","description":"Delete this Permission Overwrite.","memberof":"PermissionOverwrites","meta":{"line":36,"file":"PermissionOverwrites.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["PermissionOverwrites",">"]]]},"params":[]}],"properties":[{"id":"PermissionOverwrites#channel","name":"channel","description":"The GuildChannel this overwrite is for","memberof":"PermissionOverwrites","type":{"types":[[["GuildChannel",""]]]},"meta":{"line":10,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#id","name":"id","description":"The ID of this overwrite, either a User ID or a Role ID","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":20,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]},{"id":"PermissionOverwrites#type","name":"type","description":"The type of this overwrite","memberof":"PermissionOverwrites","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"PermissionOverwrites.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Presence","name":"Presence","description":"Represents a User's presence","meta":{"line":4,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Presence#equals","name":"equals","description":"Whether this presence is equal to another","memberof":"Presence","meta":{"line":35,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the presence to compare","type":{"types":[[["Presence",""]]]}}]}],"properties":[{"id":"Presence#status","name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","memberof":"Presence","type":{"types":[[["string",""]]]},"meta":{"line":16,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Presence#game","name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"Presence","type":{"types":[[["Game",""]]]},"meta":{"line":22,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Game","name":"Game","description":"Represents a Game that is part of a User's presence.","meta":{"line":47,"file":"Presence.js","path":"src/structures"},"methods":[{"id":"Game#equals","name":"equals","description":"Whether this game is equal to another game","memberof":"Game","meta":{"line":82,"file":"Presence.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"other","description":"the other game to compare","type":{"types":[[["Game",""]]]}}]}],"properties":[{"id":"Game#name","name":"name","description":"The name of the game being played","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#type","name":"type","description":"The type of the game status","memberof":"Game","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#url","name":"url","description":"If the game is being streamed, a link to the stream","memberof":"Game","type":{"types":[[["string",""]]]},"meta":{"line":65,"file":"Presence.js","path":"src/structures"},"props":[]},{"id":"Game#streaming","name":"streaming","description":"Whether or not the game is being streamed","memberof":"Game","type":{"types":[[["boolean",""]]]},"meta":{"line":73,"file":"Presence.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Role","name":"Role","description":"Represents a Role on Discord","meta":{"line":6,"file":"Role.js","path":"src/structures"},"methods":[{"id":"Role#serialize","name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","examples":["// print the serialized role\nconsole.log(role.serialize());"],"meta":{"line":119,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Object",".<"],["string",", "],["boolean",">"]]]},"params":[]},{"id":"Role#hasPermission","name":"hasPermission","description":"Checks if the role has a permission.","memberof":"Role","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"meta":{"line":140,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permission","description":"The permission to check for","type":{"types":[[["PermissionResolvable",""]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#hasPermissions","name":"hasPermissions","description":"Checks if the role has all specified permissions.","memberof":"Role","meta":{"line":152,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"permissions","description":"The permissions to check for","type":{"types":[[["Array",".<"],["PermissionResolvable",">"]]]}},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"Role#comparePositionTo","name":"comparePositionTo","description":"Compares this role's position to another role's.","memberof":"Role","meta":{"line":162,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role","description":"Role to compare to this one","type":{"types":[[["Role",""]]]}}]},{"id":"Role#edit","name":"edit","description":"Edits the role","memberof":"Role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"meta":{"line":176,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"data","description":"The new data for the role","type":{"types":[[["RoleData",""]]]}}]},{"id":"Role#setName","name":"setName","description":"Set a new name for the role","memberof":"Role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"meta":{"line":190,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"name","description":"The new name of the role","type":{"types":[[["string",""]]]}}]},{"id":"Role#setColor","name":"setColor","description":"Set a new color for the role","memberof":"Role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"meta":{"line":204,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":{"types":[[["number",""]],[["string",""]]]}}]},{"id":"Role#setHoist","name":"setHoist","description":"Set whether or not the role should be hoisted","memberof":"Role","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"meta":{"line":218,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#setPosition","name":"setPosition","description":"Set the position of the role","memberof":"Role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"meta":{"line":232,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"position","description":"The position of the role","type":{"types":[[["number",""]]]}}]},{"id":"Role#setPermissions","name":"setPermissions","description":"Set the permissions of the role","memberof":"Role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":246,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"permissions","description":"The permissions of the role","type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"Role#setMentionable","name":"setMentionable","description":"Set whether this role is mentionable","memberof":"Role","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"meta":{"line":260,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":{"types":[[["boolean",""]]]}}]},{"id":"Role#delete","name":"delete","description":"Deletes the role","memberof":"Role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"meta":{"line":273,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Role",">"]]]},"params":[]},{"id":"Role#equals","name":"equals","description":"Whether this role equals another role. It compares all properties, so for most operations\nit is advisable to just compare `role.id === role2.id` as it is much faster and is often\nwhat most users need.","memberof":"Role","meta":{"line":284,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"role","description":"The role to compare to","type":{"types":[[["Role",""]]]}}]},{"id":"Role#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the Role mention rather than the Role object.","memberof":"Role","meta":{"line":299,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"Role.comparePositions","name":"comparePositions","description":"Compares the positions of two roles.","memberof":"Role","meta":{"line":310,"file":"Role.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"role1","description":"First role to compare","type":{"types":[[["Role",""]]]}},{"name":"role2","description":"Second role to compare","type":{"types":[[["Role",""]]]}}]}],"properties":[{"id":"Role#client","name":"client","description":"The client that instantiated the role","memberof":"Role","type":{"types":[[["Client",""]]]},"meta":{"line":12,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#guild","name":"guild","description":"The guild that the role belongs to","memberof":"Role","type":{"types":[[["Guild",""]]]},"meta":{"line":19,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#id","name":"id","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#name","name":"name","description":"The name of the role","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#color","name":"color","description":"The base 10 color of the role","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":41,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hoist","name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":47,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#position","name":"position","description":"The position of the role in the role manager","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":53,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#permissions","name":"permissions","description":"The evaluated permissions number","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":59,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#managed","name":"managed","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":65,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#mentionable","name":"mentionable","description":"Whether or not the role can be mentioned by anyone","memberof":"Role","type":{"types":[[["boolean",""]]]},"meta":{"line":71,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdTimestamp","name":"createdTimestamp","description":"The timestamp the role was created at","memberof":"Role","type":{"types":[[["number",""]]]},"meta":{"line":79,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#createdAt","name":"createdAt","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":88,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":97,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#members","name":"members","description":"The cached guild members that have this role.","memberof":"Role","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":108,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","name":"TextChannel","description":"Represents a Server Text Channel on Discord.","meta":{"line":10,"file":"TextChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"TextChannel#fetchWebhooks","name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","memberof":"TextChannel","meta":{"line":49,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Webhook",">>"]]]},"params":[]},{"id":"TextChannel#createWebhook","name":"createWebhook","description":"Create a webhook for the channel.","memberof":"TextChannel","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.log)"],"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The name of the webhook.","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The avatar for the webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"TextChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"TextChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"TextChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"TextChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]},{"id":"TextChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}],"implements":["TextBasedChannel#fetchMessage"]},{"id":"TextChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}],"implements":["TextBasedChannel#fetchMessages"]},{"id":"TextChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[],"implements":["TextBasedChannel#fetchPinnedMessages"]},{"id":"TextChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}],"implements":["TextBasedChannel#startTyping"]},{"id":"TextChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}],"implements":["TextBasedChannel#stopTyping"]},{"id":"TextChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}],"implements":["TextBasedChannel#createCollector"]},{"id":"TextChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}],"implements":["TextBasedChannel#awaitMessages"]},{"id":"TextChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}],"implements":["TextBasedChannel#bulkDelete"]},{"id":"TextChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"TextChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"TextChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"TextChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"TextChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"TextChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"TextChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"TextChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"TextChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"TextChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"TextChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"TextChannel#topic","name":"topic","description":"The topic of the Text Channel, if there is one.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#members","name":"members","description":"A collection of members that can see this channel, mapped by their ID.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"TextChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"TextChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"TextChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"TextChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"User","name":"User","description":"Represents a User on Discord.","meta":{"line":9,"file":"User.js","path":"src/structures"},"methods":[{"id":"User#typingIn","name":"typingIn","description":"Check whether the user is typing in a channel.","memberof":"User","meta":{"line":105,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to check in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingSinceIn","name":"typingSinceIn","description":"Get the time that the user started typing.","memberof":"User","meta":{"line":115,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Date",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#typingDurationIn","name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","memberof":"User","meta":{"line":125,"file":"User.js","path":"src/structures"},"returns":{"types":[[["number",""]]]},"params":[{"name":"channel","description":"The channel to get the time in","type":{"types":[[["ChannelResolvable",""]]]}}]},{"id":"User#deleteDM","name":"deleteDM","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","meta":{"line":134,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"User#addFriend","name":"addFriend","description":"Sends a friend request to the user","memberof":"User","meta":{"line":142,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#removeFriend","name":"removeFriend","description":"Removes the user from your friends","memberof":"User","meta":{"line":150,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#block","name":"block","description":"Blocks the user","memberof":"User","meta":{"line":158,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#unblock","name":"unblock","description":"Unblocks the user","memberof":"User","meta":{"line":166,"file":"User.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[]},{"id":"User#equals","name":"equals","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","meta":{"line":176,"file":"User.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"user","description":"The user to compare","type":{"types":[[["User",""]]]}}]},{"id":"User#toString","name":"toString","description":"When concatenated with a string, this automatically concatenates the User's mention instead of the User object.","memberof":"User","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"meta":{"line":194,"file":"User.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]},{"id":"User#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"User","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendMessage"]},{"id":"User#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"User","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendTTSMessage"]},{"id":"User#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"User","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendFile"]},{"id":"User#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"User","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}],"implements":["TextBasedChannel#sendCode"]}],"properties":[{"id":"User#client","name":"client","description":"The Client that created the instance of the the User.","memberof":"User","type":{"types":[[["Client",""]]]},"meta":{"line":15,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#id","name":"id","description":"The ID of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#username","name":"username","description":"The username of the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":32,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#discriminator","name":"discriminator","description":"A discriminator based on username for the User","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":38,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatar","name":"avatar","description":"The ID of the user's avatar","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":44,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#bot","name":"bot","description":"Whether or not the User is a Bot.","memberof":"User","type":{"types":[[["boolean",""]]]},"meta":{"line":50,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdTimestamp","name":"createdTimestamp","description":"The timestamp the user was created at","memberof":"User","type":{"types":[[["number",""]]]},"meta":{"line":64,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#createdAt","name":"createdAt","description":"The time the user was created","memberof":"User","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#presence","name":"presence","description":"The presence of this user","memberof":"User","type":{"types":[[["Presence",""]]]},"meta":{"line":82,"file":"User.js","path":"src/structures"},"props":[]},{"id":"User#avatarURL","name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","memberof":"User","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"User.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"VoiceChannel","name":"VoiceChannel","description":"Represents a Server Voice Channel on Discord.","meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"},"extends":["GuildChannel"],"methods":[{"id":"VoiceChannel#setBitrate","name":"setBitrate","description":"Sets the bitrate of the channel","memberof":"VoiceChannel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"meta":{"line":74,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"Attempts to join this Voice Channel","memberof":"VoiceChannel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"meta":{"line":87,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceConnection",">"]]]},"params":[]},{"id":"VoiceChannel#leave","name":"leave","description":"Leaves this voice channel","memberof":"VoiceChannel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":97,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"VoiceChannel#permissionsFor","name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","inherits":"GuildChannel#permissionsFor","inherited":true,"meta":{"line":57,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["EvaluatedPermissions",""]]]},"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":{"types":[[["GuildMemberResolvable",""]]]}}]},{"id":"VoiceChannel#overwritePermissions","name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","memberof":"VoiceChannel","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"inherits":"GuildChannel#overwritePermissions","inherited":true,"meta":{"line":125,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"userOrRole","description":"The user or role to update","type":{"types":[[["RoleResolvable",""]],[["UserResolvable",""]]]}},{"name":"options","description":"The configuration for the update","type":{"types":[[["PermissionOverwriteOptions",""]]]}}]},{"id":"VoiceChannel#setName","name":"setName","description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"inherits":"GuildChannel#setName","inherited":true,"meta":{"line":178,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"name","description":"The new name for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#setPosition","name":"setPosition","description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"inherits":"GuildChannel#setPosition","inherited":true,"meta":{"line":192,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"position","description":"The new position for the guild channel","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#setTopic","name":"setTopic","description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"inherits":"GuildChannel#setTopic","inherited":true,"meta":{"line":206,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["GuildChannel",">"]]]},"params":[{"name":"topic","description":"The new topic for the guild channel","type":{"types":[[["string",""]]]}}]},{"id":"VoiceChannel#createInvite","name":"createInvite","description":"Create an invite to this Guild Channel","memberof":"VoiceChannel","inherits":"GuildChannel#createInvite","inherited":true,"meta":{"line":223,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[{"name":"options","description":"The options for the invite","optional":true,"type":{"types":[[["InviteOptions",""]]]}}]},{"id":"VoiceChannel#equals","name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","inherits":"GuildChannel#equals","inherited":true,"meta":{"line":233,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"channel","description":"The channel to compare this channel to","type":{"types":[[["GuildChannel",""]]]}}]},{"id":"VoiceChannel#toString","name":"toString","description":"When concatenated with a string, this automatically returns the Channel's mention instead of the Channel object.","memberof":"VoiceChannel","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"inherits":"GuildChannel#toString","inherited":true,"meta":{"line":264,"file":"GuildChannel.js","path":"src/structures"},"returns":{"types":[[["string",""]]]},"params":[]}],"properties":[{"id":"VoiceChannel#members","name":"members","description":"The members in this Voice Channel.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["GuildMember",">"]]]},"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#bitrate","name":"bitrate","description":"The bitrate of this voice channel","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#userLimit","name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#connection","name":"connection","description":"The voice connection for this voice channel, if the client is connected","memberof":"VoiceChannel","type":{"types":[[["VoiceConnection",""]]]},"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#joinable","name":"joinable","description":"Checks if the client has permission join the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#speakable","name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","memberof":"VoiceChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":60,"file":"VoiceChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#guild","name":"guild","description":"The guild the channel is in","memberof":"VoiceChannel","type":{"types":[[["Guild",""]]]},"meta":{"line":21,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#name","name":"name","description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"types":[[["string",""]]]},"meta":{"line":31,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#position","name":"position","description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"types":[[["number",""]]]},"meta":{"line":37,"file":"GuildChannel.js","path":"src/structures"},"props":[]},{"id":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"types":[[["Collection",".<"],["string",", "],["PermissionOverwrites",">"]]]},"meta":{"line":43,"file":"GuildChannel.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Webhook","name":"Webhook","description":"Represents a Webhook","meta":{"line":7,"file":"Webhook.js","path":"src/structures"},"methods":[{"id":"Webhook#sendMessage","name":"sendMessage","description":"Send a message with this webhook","memberof":"Webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":87,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send.","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide.","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendSlackMessage","name":"sendSlackMessage","description":"Send a raw slack message with this webhook","memberof":"Webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': new Date().getTime() / 1000\n }]\n}).catch(console.log);"],"meta":{"line":108,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[{"name":"body","description":"The raw body to send.","type":{"types":[[["Object",""]]]}}]},{"id":"Webhook#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","memberof":"Webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":123,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendFile","name":"sendFile","description":"Send a file with this webhook","memberof":"Webhook","meta":{"line":136,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#sendCode","name":"sendCode","description":"Send a code block with this webhook","memberof":"Webhook","meta":{"line":163,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["WebhookMessageOptions",""]]]}}]},{"id":"Webhook#edit","name":"edit","description":"Edit the Webhook.","memberof":"Webhook","meta":{"line":179,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Webhook",">"]]]},"params":[{"name":"name","description":"The new name for the Webhook","type":{"types":[[["string",""]]]}},{"name":"avatar","description":"The new avatar for the Webhook.","type":{"types":[[["FileResolvable",""]]]}}]},{"id":"Webhook#delete","name":"delete","description":"Delete the Webhook","memberof":"Webhook","meta":{"line":201,"file":"Webhook.js","path":"src/structures"},"returns":{"types":[[["Promise",""]]]},"params":[]}],"properties":[{"id":"Webhook#client","name":"client","description":"The client that instantiated the Channel","memberof":"Webhook","type":{"types":[[["Client",""]]]},"meta":{"line":14,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#name","name":"name","description":"The name of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":29,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#token","name":"token","description":"The token for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":35,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#avatar","name":"avatar","description":"The avatar for the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":41,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#id","name":"id","description":"The ID of the Webhook","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":47,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#guildID","name":"guildID","description":"The guild the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Webhook.js","path":"src/structures"},"props":[]},{"id":"Webhook#channelID","name":"channelID","description":"The channel the Webhook belongs to","memberof":"Webhook","type":{"types":[[["string",""]]]},"meta":{"line":59,"file":"Webhook.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Collection","name":"Collection","description":"A utility class to help make it easier to access the data stores","meta":{"line":5,"file":"Collection.js","path":"src/util"},"extends":["Map"],"methods":[{"id":"Collection#array","name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.values());"],"meta":{"line":32,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#keyArray","name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you add/remove elements on the array.","memberof":"Collection","examples":["// identical to:\nArray.from(collection.keys());"],"meta":{"line":45,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",""]]]},"params":[]},{"id":"Collection#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":54,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#firstKey","name":"firstKey","description":"Returns the first key in this collection.","memberof":"Collection","meta":{"line":62,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#last","name":"last","description":"Returns the last item in this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find the last element.","memberof":"Collection","meta":{"line":71,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#lastKey","name":"lastKey","description":"Returns the last key in this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find the last element.","memberof":"Collection","meta":{"line":81,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#random","name":"random","description":"Returns a random item from this collection. This is a relatively slow operation,\nsince an array copy of the values must be made to find a random element.","memberof":"Collection","meta":{"line":91,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#randomKey","name":"randomKey","description":"Returns a random key from this collection. This is a relatively slow operation,\nsince an array copy of the keys must be made to find a random element.","memberof":"Collection","meta":{"line":101,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#findAll","name":"findAll","description":"Returns an array of items where `item[prop] === value` of the collection","memberof":"Collection","examples":["collection.findAll('username', 'Bob');"],"meta":{"line":114,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#find","name":"find","description":"Returns a single item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).","memberof":"Collection","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"meta":{"line":136,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#findKey","name":"findKey","description":"Returns the key of the item where `item[prop] === value`, or the given function returns `true`.\nIn the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","memberof":"Collection","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"meta":{"line":167,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#exists","name":"exists","description":"Returns true if the collection has an item where `item[prop] === value`","memberof":"Collection","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"meta":{"line":194,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"prop","description":"The property to test against","type":{"types":[[["string",""]]]}},{"name":"value","description":"The expected value","type":{"types":[["*",""]]}}]},{"id":"Collection#filter","name":"filter","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\nbut returns a Collection instead of an Array.","memberof":"Collection","meta":{"line":206,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#filterArray","name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","memberof":"Collection","meta":{"line":222,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#map","name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","memberof":"Collection","meta":{"line":238,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["array",""]]]},"params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#some","name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","memberof":"Collection","meta":{"line":253,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#every","name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","memberof":"Collection","meta":{"line":268,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":{"types":[[["function",""]]]}},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":{"types":[[["Object",""]]]}}]},{"id":"Collection#reduce","name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","memberof":"Collection","meta":{"line":283,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"fn","description":"Function used to reduce","type":{"types":[[["function",""]]]}},{"name":"startVal","description":"The starting value","optional":true,"type":{"types":[["*",""]]}}]},{"id":"Collection#concat","name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","memberof":"Collection","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"meta":{"line":295,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Collection",""]]]},"params":[{"name":"collections","description":"Collections to merge","type":{"types":[[["Collection",""]]]}}]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":309,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"params":[]}],"properties":[],"events":[]}],"interfaces":[{"id":"TextBasedChannel","name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"},"methods":[{"id":"TextBasedChannel#sendMessage","name":"sendMessage","description":"Send a message to this channel","memberof":"TextBasedChannel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":57,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"meta":{"line":72,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","description":"The content to send","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendFile","name":"sendFile","description":"Send a file to this channel","memberof":"TextBasedChannel","meta":{"line":85,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","optional":true,"type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#sendCode","name":"sendCode","description":"Send a code block to this channel","memberof":"TextBasedChannel","meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","description":"Content of the code block","type":{"types":[[["StringResolvable",""]]]}},{"name":"options","description":"The options to provide","type":{"types":[[["MessageOptions",""]]]}}]},{"id":"TextBasedChannel#fetchMessage","name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.","memberof":"TextBasedChannel","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"meta":{"line":132,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"messageID","description":"The ID of the message to get","type":{"types":[[["string",""]]]}}]},{"id":"TextBasedChannel#fetchMessages","name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a Collection mapping message ID's to Message objects.","memberof":"TextBasedChannel","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"meta":{"line":164,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"options","description":"The query parameters to pass in","optional":true,"type":{"types":[[["ChannelLogsQueryOptions",""]]]}}]},{"id":"TextBasedChannel#fetchPinnedMessages","name":"fetchPinnedMessages","description":"Fetches the pinned messages of this Channel and returns a Collection of them.","memberof":"TextBasedChannel","meta":{"line":182,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[]},{"id":"TextBasedChannel#startTyping","name":"startTyping","description":"Starts a typing indicator in the channel.","memberof":"TextBasedChannel","examples":["// start typing in a channel\nchannel.startTyping();"],"meta":{"line":203,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"TextBasedChannel#stopTyping","name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\nIt can take a few seconds for the Client User to stop typing.","memberof":"TextBasedChannel","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"meta":{"line":231,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"TextBasedChannel#createCollector","name":"createCollector","description":"Creates a Message Collector","memberof":"TextBasedChannel","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"meta":{"line":275,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the collector with","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"The options to pass to the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},{"id":"TextBasedChannel#awaitMessages","name":"awaitMessages","description":"Similar to createCollector but in Promise form. Resolves with a Collection of messages that pass the specified\nfilter.","memberof":"TextBasedChannel","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"meta":{"line":299,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to use","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"type":{"types":[[["AwaitMessagesOptions",""]]]}}]},{"id":"TextBasedChannel#bulkDelete","name":"bulkDelete","description":"Bulk delete a given Collection or Array of messages in one go. Returns the deleted messages after.\nOnly OAuth Bot accounts may use this method.","memberof":"TextBasedChannel","meta":{"line":318,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"params":[{"name":"messages","description":"The messages to delete","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]],[["Array",".<"],["Message",">"]]]}}]}],"properties":[{"id":"TextBasedChannel#messages","name":"messages","description":"A Collection containing the messages sent to this channel.","memberof":"TextBasedChannel","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#lastMessageID","name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","memberof":"TextBasedChannel","type":{"types":[[["string",""]]]},"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typing","name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","memberof":"TextBasedChannel","type":{"types":[[["boolean",""]]]},"meta":{"line":247,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"TextBasedChannel#typingCount","name":"typingCount","description":"Number of times `startTyping` has been called.","memberof":"TextBasedChannel","type":{"types":[[["number",""]]]},"meta":{"line":256,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A User ID\n* A Message (resolves to the message author)\n* A Guild (owner of the guild)\n* A Guild Member","type":{"types":[[["User",""]],[["string",""]],[["Message",""]],[["Guild",""]],[["GuildMember",""]]]},"meta":{"line":25,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildResolvable","name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object","type":{"types":[[["Guild",""]]]},"meta":{"line":62,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"GuildMemberResolvable","name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":{"types":[[["Guild",""]]]},"meta":{"line":79,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"ChannelResolvable","name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* An instance of a Channel\n* An instance of a Message (the channel the message was sent in)\n* An instance of a Guild (the #general channel)\n* An ID of a Channel","type":{"types":[[["Channel",""]],[["Guild",""]],[["Message",""]],[["string",""]]]},"meta":{"line":102,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"InviteResolvable","name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":{"types":[[["string",""]]]},"meta":{"line":124,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"PermissionResolvable","name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string\n* A permission number\n\nPossible strings:\n```js\n[\n \"CREATE_INSTANT_INVITE\",\n \"KICK_MEMBERS\",\n \"BAN_MEMBERS\",\n \"ADMINISTRATOR\",\n \"MANAGE_CHANNELS\",\n \"MANAGE_GUILD\",\n \"READ_MESSAGES\",\n \"SEND_MESSAGES\",\n \"SEND_TTS_MESSAGES\",\n \"MANAGE_MESSAGES\",\n \"EMBED_LINKS\",\n \"ATTACH_FILES\",\n \"READ_MESSAGE_HISTORY\",\n \"MENTION_EVERYONE\",\n \"EXTERNAL_EMOJIS\", // use external emojis\n \"CONNECT\", // connect to voice\n \"SPEAK\", // speak on voice\n \"MUTE_MEMBERS\", // globally mute members on voice\n \"DEAFEN_MEMBERS\", // globally deafen members on voice\n \"MOVE_MEMBERS\", // move member's voice channels\n \"USE_VAD\", // use voice activity detection\n \"CHANGE_NICKNAME\",\n \"MANAGE_NICKNAMES\", // change nicknames of others\n \"MANAGE_ROLES_OR_PERMISSIONS\"\n]\n```","type":{"types":[[["string",""]],[["number",""]]]},"meta":{"line":144,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StringResolvable","name":"StringResolvable","description":"Data that can be resolved to give a string. This can be:\n* A string\n* An Array (joined with a new line delimiter to give a string)\n* Any value","type":{"types":[[["string",""]],[["Array",""]],["*",""]]},"meta":{"line":192,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"Base64Resolvable","name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A Base64 string","type":{"types":[[["Buffer",""]],[["string",""]]]},"meta":{"line":211,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"FileResolvable","name":"FileResolvable","description":"Data that can be resolved to give a Buffer. This can be:\n* A Buffer\n* The path to a local file\n* A URL","type":{"types":[[["string",""]],[["Buffer",""]]]},"meta":{"line":228,"file":"ClientDataResolver.js","path":"src/client"},"properties":[]},{"id":"StreamOptions","name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":{"types":[[["Object",""]]]},"meta":{"line":214,"file":"VoiceConnection.js","path":"src/client/voice"},"properties":[{"name":"seek","description":"The time to seek to","optional":true,"type":{"types":[[["number",""]]]}},{"name":"volume","description":"The volume to play at","optional":true,"type":{"types":[[["number",""]]]}},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"PermissionOverwriteOptions","name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":{"types":[[["Object",""]]]},"meta":{"line":101,"file":"GuildChannel.js","path":"src/structures"},"properties":[]},{"id":"InviteOptions","name":"InviteOptions","description":"Options given when creating a Guild Channel Invite","type":{"types":[[["Object",""]]]},"meta":{"line":210,"file":"GuildChannel.js","path":"src/structures"},"properties":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"type":{"types":[[["maxUses",""]]]}}]},{"id":"MessageOptions","name":"MessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode, or Message.reply","type":{"types":[[["Object",""]]]},"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"nonce","description":"The nonce for the message","optional":true,"type":{"types":[[["string",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"split","description":"Whether or not the message should be split into multiple messages if\nit exceeds the character limit. If an object is provided, these are the options for splitting the message.","optional":true,"type":{"types":[[["boolean",""]],[["SplitOptions",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":37,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"type":{"types":[[["number",""]]]}},{"name":"char","description":"Character to split the message with","optional":true,"type":{"types":[[["string",""]]]}},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"type":{"types":[[["string",""]]]}},{"name":"append","description":"Text to append to every piece except the last","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"ChannelLogsQueryOptions","name":"ChannelLogsQueryOptions","description":"The parameters to pass in when requesting previous messages from a channel. `around`, `before` and\n`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":144,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"limit","description":"Number of messages to acquire","optional":true,"type":{"types":[[["number",""]]]}},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":{"types":[[["string",""]]]}},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"AwaitMessagesOptions","name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":279,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}}]},{"id":"CollectorFilterFunction","name":"CollectorFilterFunction","description":"A function that takes a Message object and a MessageCollector and returns a boolean.\n```js\nfunction(message, collector) {\n if (message.content.includes('discord')) {\n return true; // passed the filter test\n }\n return false; // failed the filter test\n}\n```","type":{"types":[[["function",""]]]},"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"},"properties":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":{"types":[[["number",""]]]}},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":{"types":[[["number",""]]]}},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":{"types":[[["number",""]]]}}]},{"id":"WebhookMessageOptions","name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":{"types":[[["Object",""]]]},"meta":{"line":68,"file":"Webhook.js","path":"src/structures"},"properties":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"type":{"types":[[["boolean",""]]]}}]},{"id":"ClientOptions","name":"ClientOptions","description":"Options for a Client.","type":{"types":[[["Object",""]]]},"meta":{"line":3,"file":"Constants.js","path":"src/util"},"properties":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"type":{"types":[[["string",""]]]}},{"name":"shardId","description":"The ID of this shard","optional":true,"type":{"types":[[["number",""]]]}},{"name":"shardCount","description":"The number of shards","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 for unlimited - don't do this without message sweeping, otherwise memory usage will climb indefinitely)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"type":{"types":[[["number",""]]]}},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"type":{"types":[[["boolean",""]]]}},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"type":{"types":[[["number",""]]]}},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed. Disabling useless events such as 'TYPING_START' can result in significant performance increases on\nlarge-scale bots.","optional":true,"type":{"types":[[["Array",".<"],["string",">"]]]}},{"name":"ws","description":"Options for the websocket","optional":true,"type":{"types":[[["WebsocketOptions",""]]]}}]},{"id":"WebsocketOptions","name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":{"types":[[["Object",""]]]},"meta":{"line":38,"file":"Constants.js","path":"src/util"},"properties":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"type":{"types":[[["number",""]]]}},{"name":"compress","description":"Whether to compress data sent on the connection","optional":true,"type":{"types":[[["boolean",""]]]}}]}],"custom":{"general":[{"category":"general","name":"Welcome","data":"

\r\n \r\n \"discord.js\"
\r\n
\r\n

\r\n\r\n[![Discord](https://discordapp.com/api/guilds/222078108977594368/embed.png)](https://discord.gg/bRCvFy9)\r\n[![npm](https://img.shields.io/npm/v/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![npm](https://img.shields.io/npm/dt/discord.js.svg?maxAge=2592000)](https://www.npmjs.com/package/discord.js)\r\n[![Build Status](https://travis-ci.org/hydrabolt/discord.js.svg)](https://travis-ci.org/hydrabolt/discord.js)\r\n[![David](https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=2592000)](https://david-dm.org/hydrabolt/discord.js)\r\n\r\n[![NPM](https://nodei.co/npm/discord.js.png?downloads=true&stars=true)](https://nodei.co/npm/discord.js/)\r\n\r\ndiscord.js is a powerful node.js module that allows you to interact with the [Discord API](https://discordapp.com/developers/docs/intro).\r\n\r\n# Welcome!\r\nWelcome to the discord.js v9 documentation. The v9 rewrite has taken a lot of time, but it should be much more\r\nstable and performant than previous versions.\r\n\r\n## Installation\r\n**Node.js 6.0.0 or newer is required.** \r\nWithout voice support: `npm install discord.js --save` \r\nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` \r\nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save` \r\nIf both audio packages are installed, discord.js will automatically prefer node-opus.\r\n\r\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript.\r\nUsing opusscript is only recommended for development on Windows, since getting node-opus to build there can be a bit of a challenge.\r\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\r\n\r\n## Guides\r\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\r\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\r\n\r\n## Links\r\n* [Website](http://hydrabolt.github.io/discord.js/)\r\n* [Discord.js server](https://discord.gg/bRCvFy9)\r\n* [Discord API server](https://discord.gg/rV4BwdK)\r\n* [Documentation](http://hydrabolt.github.io/discord.js/#!/docs/tag/master)\r\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\r\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/custom/examples)\r\n* [GitHub](https://github.com/hydrabolt/discord.js)\r\n* [NPM](https://www.npmjs.com/package/discord.js)\r\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\r\n\r\n## Help\r\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\r\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\r\n"},{"category":"general","name":"Updating your code","data":"# About Version 9\r\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\r\nwhich allows your code to be much more readable and manageable.\r\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\r\nolder versions. It also has support for newer Discord Features, such as emojis.\r\n\r\n## Upgrading your code\r\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\r\nmost of the concepts are still the same, but loads of functions have been moved around.\r\nThe vast majority of methods you're used to using have been moved out of the Client class,\r\ninto other more relevant classes where they belong.\r\nBecause of this, you will need to convert most of your calls over to the new methods.\r\n\r\nHere are a few examples of methods that have changed:\r\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\r\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\r\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\r\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\r\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\r\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\r\n\r\nA couple more important details:\r\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\r\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\r\n\r\n## Callbacks\r\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \r\nFor example, the following code:\r\n\r\n```js\r\nclient.getChannelLogs(channel, 100, function(messages) {\r\n console.log(`${messages.length} messages found`);\r\n});\r\n```\r\n\r\n```js\r\nchannel.fetchMessages({limit: 100}).then(messages => {\r\n console.log(`${messages.size} messages found`);\r\n});\r\n```\r\n"},{"category":"general","name":"FAQ","data":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## I get an absurd amount of errors when installing discord.js on Windows‽\nThe installation still worked fine, just without `node-opus`.\nIf you don't need voice support, using `npm install discord.js --no-optional` will prevent these errors.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Optionally, set up `node-opus`, which is much faster than the default `opusscript`.\n\n## How do I install FFMPEG?\n- **Ubuntu 16.04:** `sudo apt install ffpmeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** It's already done when you run `npm install discord.js` without `--no-optional`. Congrats!\n- **Windows:** See [AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md). Good luck.\n"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"},{"category":"examples","name":"Avatars","data":"```js\n/*\n Send a user a link to their avatar\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"what is my avatar\",\n if (message.content === 'what is my avatar') {\n // send the user's avatar URL\n message.reply(message.author.avatarURL);\n }\n});\n\n// log our bot in\nbot.login(token);\n\n```"}]}} \ No newline at end of file diff --git a/src/client/ClientDataManager.js b/src/client/ClientDataManager.js index e56a8f6a8..7d837d970 100644 --- a/src/client/ClientDataManager.js +++ b/src/client/ClientDataManager.js @@ -118,6 +118,12 @@ class ClientDataManager { updateChannel(currentChannel, newData) { currentChannel.setup(newData); } + + updateEmoji(currentEmoji, newData) { + const oldEmoji = cloneObject(currentEmoji); + currentEmoji.setup(newData); + this.client.emit(Constants.Events.GUILD_EMOJI_UPDATE, oldEmoji, currentEmoji); + } } module.exports = ClientDataManager; diff --git a/src/client/actions/GuildEmojiUpdate.js b/src/client/actions/GuildEmojiUpdate.js index 087e42046..88e0c395c 100644 --- a/src/client/actions/GuildEmojiUpdate.js +++ b/src/client/actions/GuildEmojiUpdate.js @@ -1,13 +1,15 @@ const Action = require('./Action'); -const Constants = require('../../util/Constants'); class GuildEmojiUpdateAction extends Action { handle(data, guild) { const client = this.client; for (let emoji of data.emojis) { const already = guild.emojis.has(emoji.id); - emoji = client.dataManager.newEmoji(emoji, guild); - if (already) client.emit(Constants.Events.GUILD_EMOJI_UPDATE, guild, emoji); + if (already) { + client.dataManager.updateEmoji(guild.emojis.get(emoji.id), emoji); + } else { + emoji = client.dataManager.newEmoji(emoji, guild); + } } for (let emoji of guild.emojis) { if (!data.emoijs.has(emoji.id)) client.dataManager.killEmoji(emoji); @@ -21,7 +23,7 @@ class GuildEmojiUpdateAction extends Action { /** * Emitted whenever an emoji is updated * @event Client#guildEmojiUpdate - * @param {Guild} guild The guild that the emoji was updated in. - * @param {Emoji} emoji The emoji that was updated. + * @param {Emoji} oldEmoji The old emoji + * @param {Emoji} newEmoji The new emoji */ module.exports = GuildEmojiUpdateAction;